Overview
TheuseRowSelection hook is used within custom cell renderers to implement custom row selection functionality. It provides access to the current row’s selection state and a callback to change the selection.
Signature
Return Value
Whether selection is disabled for this row.
Whether this row is currently selected.
Callback function to change the selection state of the row.
SelectRowEvent Type
The row object.
Whether the row should be selected.
Whether the shift key was pressed during selection (for range selection).
Usage
This hook must be called within a custom cell renderer that is rendered inside the DataGrid.Error Handling
The hook will throw an error if used outside of a cell renderer:Related
- useHeaderRowSelection - Hook for header row selection
- SelectColumn - Pre-configured column for row selection
- renderCheckbox - Default checkbox renderer