BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
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;
}
} |