Row Selection
Select rows with checkboxes. Supports select-all and controlled state.
ID
Name
Email
Department
Salary
100 rows
Add a selection column with checkboxes:
const { rowSelection } = useVirtualTable({
data,
columns,
enableRowSelection: true,
getRowId: (row) => row.id,
});
// Selection column:
{
id: 'select',
header: ({ table }) => (
<Checkbox checked={table.getIsAllRowsSelected()} />
),
cell: ({ row }) => (
<Checkbox checked={row.getIsSelected()} />
),
}| Option | Type | Default |
|---|---|---|
enableRowSelection | boolean | false |
rowSelection | RowSelectionState | — |
onRowSelectionChange | (state) => void | — |