SelectionMethods
Selection methods returned from useGridSelection.
Uses the injected grid element from TbwGrid’s provide/inject. Methods work immediately when grid is available.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
selectAll | () => void | Select all rows (row mode) or all cells (range mode). |
clearSelection | () => void | Clear all selection. |
getSelection | () => SelectionResult | unknown | Get the current selection state. Use this to derive selected rows, indices, etc. |
isCellSelected | (row: number, col: number) => boolean | Check if a specific cell is selected. |
setRanges | (ranges: CellRange[]) => void | Set selection ranges programmatically. |
getSelectedRows | () => TRow[] | Get actual row objects for the current selection. Works in all selection modes (row, cell, range) — resolves indices against the grid’s processed (sorted/filtered) rows. |
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