Row Expansion
The row expansion feature provides methods and state for expanding and collapsing rows to show nested or additional content. These properties are available on the table instance when using the row expansion feature. See the row expansion guide for usage examples and configuration details.
| Prop | Type |
|---|---|
Returns whether there are any rows that can be expanded. | () => boolean |
Returns the maximum depth of the expanded rows. | () => number |
Returns the row model after expansion has been applied. | () => { |
Returns whether all rows are currently expanded. | () => boolean |
Returns whether there are any rows that are currently expanded. | () => boolean |
Returns the row model before expansion has been applied. | () => { |
Returns a handler that can be used to toggle the expanded state of all rows.
This handler is meant to be used with an input[type=checkbox] element. | () => ( |
Resets the expanded state of the table to the initial state. | ( |
Updates the expanded state of the table via an update function or value. | ( |
Toggles the expanded state for all rows. | ( |
Type
() => boolean
Description
Returns whether there are any rows that can be expanded.
Type
() => number
Description
Returns the maximum depth of the expanded rows.
Type
() => {
flatRows: Row[]
rows: Row[]
rowsById: Record
}
Description
Returns the row model after expansion has been applied.
Type
() => boolean
Description
Returns whether all rows are currently expanded.
Type
() => boolean
Description
Returns whether there are any rows that are currently expanded.
Type
() => {
flatRows: Row[]
rows: Row[]
rowsById: Record
}
Description
Returns the row model before expansion has been applied.
Type
() => (
event: unknown,
) => void
Description
Returns a handler that can be used to toggle the expanded state of all rows.
This handler is meant to be used with an
input[type=checkbox] element.Type
(
defaultState?: boolean,
) => void
Description
Resets the expanded state of the table to the initial state.
Type
(
updater:
| T
| ((old: T) => T),
) => void
Description
Updates the expanded state of the table via an update function or value.
Type
(
expanded?: boolean,
) => void
Description
Toggles the expanded state for all rows.