Disabled Rows
Disabling rows allows you to have some rows that are not selectable, not clickable, not reacheable via keyboard navigation and other interactions.
The
DataSource manages the disabled state of rows, via the defaultRowDisabledState (uncontrolled) prop and rowDisabledState (controlled) prop.In addition to using the
defaultRowDisabledState/rowDisabledState props, you can also specify the isRowDisabled function prop, which overrides those other props and ultimately determines whether a row is disabled or not.#
Specify some rows as initially disabled
loading demo…
Using disabled rows while rendering#
When rendering a cell, you have access to the row disabled state - the
InfiniteTableRowInfo type has a rowDisabled property which is true if the row is disabled.#
Using the row disabled state while rendering
This example uses custom rendering for the
firstName column to render an emoji for disabled rows.loading demo…
Using the API to enable/disable rows#
You can use the
DataSourceApi to enable or disable rows programmatically.setRowEnabled
setRowEnabledAt
#
Using the API to enable/disable rows
Use the context menu on each row to toggle the disabled state of the respective row.
loading demo…