useRowSelectColumn
The useRowSelectColumn
react-table plugin hook injects a new column at the beginning showing checkboxes to select rows.
This hook depends on the useRowSelect
hook from react-table
. For grouped rows the checkbox selects the whole group.
In addition, it supports a range selection similar to GMail by using the shift
key.
Clicking on a checkbox while pressing the shift
key will automatically select all rows before this row till it either reaches the first row or a already selected row.
Live Editor
Result
Name | Age | Shirt Size | |
---|---|---|---|
Panchito Green | 10 | S | |
Rubia Robker | 25 | M | |
Micheil Sappell | 50 | L | |
Geoffrey Sprason | 30 | M | |
Grissel Rounsefull | 21 | S |