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.
cancelEdit
Cancels the current edit operation and closes the editor.
clearColumnFilter
Clears any filter for the specified column
collapseGroupRow
Collapses the specified group row. Returns true if the group was expanded and is now being collapsed.
confirmEdit
Confirms the current edit operation and closes the editor.
expandGroupRow
Expands the specified group row. Returns true if the group was collapsed and is now being expanded.
getCellValue
Returns the value for the specified cell. The value is either the raw value (as retrieved via the field
property of the column or by calling the column valueGetter
) or the formatted value - if the column has a valueFormatter
.
getCellValues
Returns an object with raw and formatted values for the specified cell.
getColumnApi
Returns a column API object bound to the specified column
getVerticalRenderRange
Returns the vertical render range of the table
onReady
Called when the table has been layed out and sized and is ready to be used.
rejectEdit
Rejects the current edit operation with the specified error and closes the editor.
scrollCellIntoView
Can be used to scroll a cell into the visible viewport
scrollColumnIntoView
Can be used to scroll a column into the visible viewport
scrollLeft
Gets or sets the scrollLeft
value in the grid viewport
scrollRowIntoView
Can be used to scroll a row into the visible viewport
scrollTop
Gets or sets the scrollTop
value in the grid viewport
selectionApi
Getter for the Selection API
setColumnFilter
Sets a filter value for the specified column
setColumnOrder
Set the column order.
startEdit
Tries to start editing the cell specified by the given row index and column id.
toggleGroupRow
Toggles the collapse/expand state of the specified group row