Infinite Table Selection API

When rendering the InfiniteTable component, you can get access to the API by getting it from the onReady callback prop. You can retrieve the selection api by reading it from the api.selectionApi property.

<InfiniteTable<DATA_TYPE>
  columns={[...]}
  onReady={(api: InfiniteTableApi<DATA_TYPE>) => {
    // do something with it
    api.selectionApi.selectGroupRow(['USA'])
  }}
/>

For the root API, see the Infinite Table API page. For Ccolumn API, see the Infinite Table Column API page.

allRowsSelected

boolean

Boolean getter to report whether all the rows are selected or not

deselectGroupRow

(groupKeys: any[]) => void

Deselects the group row that is identified by the given group keys. Only makes sense when the DataSource is grouped.

deselectRow

(primaryKey: any, groupKeys?: any[]) => boolean

Deselects the specified row. Optionally provide the group keys, if you have access to them.

deselectAll

() => void

Deselects all the rows in the DataSource.

getGroupRowSelectionState

(groupKeys: any[], rowSelection?: DataSourceRowSelection) => true|false|null

Returns the state of a group row - only applicable when the DataSource is grouped

getSelectedPrimaryKeys

(rowSelection?: DataSourceRowSelection) => (string|number)[]

Retrieves the ids (primary keys) of the selected rows, when the selection contains group keys instead of primary keys (so when useGroupKeysForMultiRowSelection is true and the DataSource is grouped).

isRowSelected

(primaryKey: any, groupKeys?: any[]) => boolean

Checks if a row specified by its primary key is selected or not. Optionally provide the group keys, if you have access to them.

isRowDeselected

(primaryKey: any, groupKeys?: any[]) => boolean

Checks if a row specified by its primary key is deselected or not. Optionally provide the group keys, if you have access to them.

selectAll

() => void

Selects all the rows in the DataSource.

selectGroupRow

(groupKeys: any[]) => void

Selects the group row that is identified by the given group keys. Only makes sense when the DataSource is grouped.

selectRow

(primaryKey: any, groupKeys?: any[]) => boolean

Selects the specified row. Optionally provide the group keys, if you have access to them.

toggleGroupRowSelection

(groupKeys: any[]) => void

Toggles the selection of the group row that is identified by the given group keys. Only makes sense when the DataSource is grouped.

toggleRowSelection

(primaryKey: any, groupKeys?: any[]) => boolean

Toggles the selection of the specified row. Optionally provide the group keys, if you have access to them.