Infinite Table API

When rendering the InfiniteTable component, you can get access to the API by getting it from the onReady callback prop.

const onReady = (
  {api, dataSourceApi}: {
    api: InfiniteTableApi<DATA_TYPE>,
    dataSourceApi: DataSourceApi<DATA_TYPE>
  }) => {
  // api is accessible here
  // you may want to store a reference to it in a ref or somewhere in your app state
}

<InfiniteTable<DATA_TYPE>
  columns={[...]}
  onReady={onReady}

For API on row/group selection, see the Selection API page.

clearColumnFilter

(columnId: string) =>void

Clears any filter for the specified column

collapseGroupRow

(groupKeys: any[]) => boolean

Collapses the specified group row. Returns true if the group was expanded and is now being collapsed.

expandGroupRow

(groupKeys: any[]) => boolean

Expands the specified group row. Returns true if the group was collapsed and is now being expanded.

getVerticalRenderRange

() => { renderStartIndex, renderEndIndex }

Returns the vertical render range of the table

onReady

({ api, dataSourceApi }) => void

Called when the table has been layed out and sized and is ready to be used.

startEdit

({ rowIndex, columnId }) => Promise<boolean>

Tries to start editing the cell specified by the given row index and column id.

scrollCellIntoView

(rowIndex: number; colIdOrIndex: string | number) => boolean

Can be used to scroll a cell into the visible viewport

scrollColumnIntoView

(colId: string) => boolean

Can be used to scroll a column into the visible viewport

scrollLeft

getter<number>|setter<number>

Gets or sets the scrollLeft value in the grid viewport

scrollRowIntoView

(rowIndex: number) => boolean

Can be used to scroll a row into the visible viewport

scrollTop

getter<number>|setter<number>

Gets or sets the scrollTop value in the grid viewport

selectionApi

InfiniteTableSelectionApi

Getter for the Selection API

setColumnFilter

(columnId: string, value: any) =>void

Sets a filter value for the specified column

setColumnOrder

(columnIds: string[] | true) => void

Set the column order.

toggleGroupRow

(groupKeys: any[]) => void

Toggles the collapse/expand state of the specified group row