mvysny / karibu-testing

Vaadin Server-Side Browserless Containerless Unit Testing
Apache License 2.0
105 stars 14 forks source link

Grid<T>._clickItem with rowIndex and column parameters #82

Closed hfazai closed 2 years ago

hfazai commented 2 years ago

Before opening a PR I thought of discussing the add of this function:

In my case I have an ItemClickListener that works on the clicked column:

grid.addItemClickListener {
      val clickedColumn = it.column
 }

There is already a Grid<T>._clickItem function but it.column always return null.

So maybe we can add:

public fun <T : Any> Grid<T>._clickItem(rowIndex: Int, column: Grid.Column<*>, button: Int = 1, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false)

and

public fun <T : Any> Grid<T>._clickItem(rowIndex: Int, columnKey: String, button: Int = 1, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false)
mvysny commented 2 years ago

Sounds good to me 👍 please feel free to open a PR