Skip to content

SelectableCallback

Callback that determines whether a specific row or cell can be selected.

Return true if the row/cell should be selectable, false otherwise.

type SelectableCallback = (row: T, rowIndex: number, column: ColumnConfig, colIndex: number) => boolean
// Prevent selection of locked rows
isSelectable: (row) => row.status !== 'locked'
// Prevent selection of specific columns
isSelectable: (row, rowIndex, col) => col?.field !== 'id'
// Permission-based selection
isSelectable: (row) => userPermissions.canSelect(row)
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt