open-row
Description
Fires when opening (expanding) a row
To trigger the Table event, it's necessary to get access to the Table instance inside Pivot via the getTable
method. The tree mode should be enabled via the tableShape
property.
Usage
"open-row": ({
id: string | number,
nested?: boolean
}) => boolean|void;
Parameters
The callback of the action takes an object with the following parameters:
id
- (required) the id of a row that have nested rowsnested
- (optional) if set to true, all nested items will be expanded
note
If id
is set to 0 and nested
to true, all rows in the table will be expanded
Example
The snippet below demonstrates how to open/close all rows with a button click:
Related articles: