Skip to main content

beforeCollapse

fires before collapsing a tree item

beforeCollapse: (id: Id) => boolean | void;

Parameters:

id: string | number - the id of a collapsed item

Returns:

Return false to block collapsing a tree item; otherwise, true.

Example

tree.events.on("BeforeCollapse", function(id) {    // your logic here    return false;});

Related sample: Tree. Events

Change log:

added in v6.4