beforeCollapse
fires before collapsing a tree item
beforeCollapse: (id: string | number) => 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