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
Note
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}
See the Infinite Table API page for the main 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
An alias for deselectAll.
deselectAll
() => void
Deselects all cells in the DataGrid.
deselectCell
({ rowIndex/rowId, colIndex/colId}) => void
Deselects the specified cell.
deselectRange
(start, end) => void
Deselects the specified cell range.
isCellSelected
({rowIndex/rowId, colIndex/colId}) => boolean
Boolean getter to report if a cell is selected.
mapCellSelectionPositions
(fn: (rowInfo, colId) => any, emptyValue)
Maps the selected cells using the passed fn.
selectAll
() => void
Selects all cells in the DataGrid.
selectCell
({ rowIndex/rowId, colIndex/colId, clear?: boolean}) => void
Selects the specified cell.
selectColumn
(colId: string)=> void
Selects all cells in the specified column.
selectRange
(start, end) => void
Selects the specified cell range.