Infinite Table Cell Selection API
Configuring the selection mode to be 'multi-cell'
<DataSource selectionMode="multi-cell" />
// can be "single-row", "multi-row", "multi-cell" or false
COPY
To enable cell selection, you need to specify
selectionMode="multi-cell"
on the <DataSource />
component.You can retrieve the cell selection api by reading it from the
api.cellSelectionApi
property.const onReady = ({api}: {api:InfiniteTableApi<DATA_TYPE>}) => { // do something with it api.cellSelectionApi.selectGroupRow(['USA']) } <InfiniteTable<DATA_TYPE> columns={[...]} onReady={onReady}
COPY
See the Infinite Table API page for the main API.
See the Infinite Table Keyboard Navigation API page for the keyboard navigation API.
See the Infinite Table Row Selection API page for the row selection API.
See the Infinite Table Column API page for the column API.
clear
() => void
deselectAll
() => void
deselectCell
({ rowIndex/rowId, colIndex/colId}) => void
deselectRange
(start, end) => void
isCellSelected
({rowIndex/rowId, colIndex/colId}) => boolean
mapCellSelectionPositions
(fn: (rowInfo, colId) => any, emptyValue)
selectAll
() => void
selectCell
({ rowIndex/rowId, colIndex/colId, clear?: boolean}) => void
selectColumn
(colId: string)=> void
selectRange
(start, end) => void