Skip to main content

close-row

Description

Fires when closing (collapsing) a row

To trigger the Table event, it's necessary to get access to the underlying Table widget instance inside Pivot via the getTable method. The tree mode should be enabled via the tableShape property.

Usage

"close-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 has nested rows
  • nested - (optional) if set to true, all nested items will be collapsed
note

If id is set to 0 and nested to true, all rows in the table will be collapsed

Example

The snippet below demonstrates how to open/close all rows with a button click:

Related articles: