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.
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 Details API page for the row detail API (when master-detail is configured).
See the Tree API page for the tree API (when using the <TreeDataSource />
component).
cancelEdit
Cancels the current edit operation and closes the editor.
cellSelectionApi
Getter for the Cell Selection API
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
getSortingForColumn
Returns the sorting currently applied to the specified column.
getVerticalRenderRange
Returns the vertical render range of the table
hideContextMenu
Hides the context menu that's currently displayed (if there's one).
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.
rowDetailApi
Getter for the Row Detail API
rowSelectionApi
Getter for the Row Selection API
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
setColumnFilter
Sets a filter value for the specified column
setColumnOrder
Set the column order.
setSortingForColumn
Sets the sorting for the specified column.
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
toggleSortingForColumn
Toggles the sorting for the specified column.