Infinite Table Row Selection API
Configuring the selection mode to be 'multi-row'
<DataSource selectionMode="multi-row" /> // can be "single-row", "multi-row", "multi-cell" or false
COPY
To enable multi-row selection, you need to specify
selectionMode="multi-row"
on the <DataSource />
component.You can retrieve the row selection api by reading it from the
api.rowSelectionApi
property.const onReady = ({api}: {api:InfiniteTableApi<DATA_TYPE>}) => { // do something with it api.rowSelectionApi.selectGroupRow(['USA']) } <InfiniteTable<DATA_TYPE> columns={[...]} onReady={onReady}
COPY
See the Infinite Table API page for the main API. See the Infinite Table Cell Selection API page for the cell selection API. See the Infinite Table Column API page for the column API. See the Infinite Table Row Detail API page for the row detail API (when master-detail is configured).
allRowsSelected
boolean
deselectAll
() => void
deselectGroupRow
(groupKeys: any[]) => void
deselectRow
(primaryKey: any, groupKeys?: any[]) => boolean
getGroupRowSelectionState
(groupKeys: any[], rowSelection?: DataSourceRowSelection) => true|false|null
getSelectedPrimaryKeys
(rowSelection?: DataSourceRowSelection) => (string|number)[]
isRowDeselected
(primaryKey: any, groupKeys?: any[]) => boolean
isRowSelected
(primaryKey: any, groupKeys?: any[]) => boolean
selectAll
() => void
selectGroupRow
(groupKeys: any[]) => void
selectRow
(primaryKey: any, groupKeys?: any[]) => boolean
toggleGroupRowSelection
(groupKeys: any[]) => void
toggleRowSelection
(primaryKey: any, groupKeys?: any[]) => boolean