Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Multiple row selection in table component #11404
What problem does this feature solve?
When working with the table component, I sometimes have to select a large number of contiguous rows. To do that, we currently have to select each row independently. This process can be very long and painstaking.
In order to facilitate the selection or unselection of multiple contiguous rows, I propose a new feature to allow multiple row selection/unselection.
To (un)select multiple rows, click the checkbox of the first row and shift-click the checkbox of the last row. All the rows located between the first and the last rows shall be (un)selected. If the last row was selected, the rows shall be unselected and if it was unselected, the rows shall be selected. The described behavior is the same as the Google Gmail application.
What does the proposed API look like?
The rowSelection config should handle a new type of callback : onSelectMulti.
This callback should be called when rows are (un)selected using the multiple row (un)selection feature. The callback should have the same type as the onSelectAll callback (Function(selected, selectedRows, changeRows))