Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143208 | Mar 8,2019 08:23 PM UTC | Mar 11,2019 12:23 PM UTC | React - EJ 2 | 1 |
![]() |
Tags: Treeview |
onExpand(args) {
let parentId = args.nodeData["id"];
// checks whether the expand action happens for the first time
if (this.expandedNode.indexOf(parentId) === -1) {
this.expandedNode.push(parentId);
let liEle = args.node.querySelectorAll('ul li');
for (let i = 0; i < liEle.length; i++) {
var id = liEle[i].getAttribute("data-uid");
// checks whether the child nodes of the expanded node is in checkedNode
if (this.checkedNodes.indexOf(id) !== -1) {
this.treeObj.checkAll([liEle[i]]);
}
}
} else {
// Cancel the event if the node is already expanded and checked
args.cancel = true;
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.