beforeCheck
fires before the state of an item is changed
beforeCheck: (index: number, id: string | number) => boolean | void;
Parameters:
index: number
- the position of an itemid: string | number
- the id of the item
Returns:
Return false
to block changing of the state of a tree item; otherwise, true
.
Example
tree.events.on("beforeCheck", function (index, id) {
console.log("beforeCheck", index, id);
// return false;
});
Change log:
added in v7.1