You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should loop recursively through the tree from the root node and set all _children to children and children to null then call update on the root node.
Thanks!
I have found the solution:
`function expand(d){
if (d._children) {
d.children = d._children;
d._children = null;
}
var children = (d.children)?d.children:d._children;
if(children)
children.forEach(expand);
}
function expandAll(){
expand(root);
update(root);
}
How to expand all node by one click?
The text was updated successfully, but these errors were encountered: