Currently, if a given tree node has no children (but the nodes array is defined as empty), the expand/collapse icons still render. I believe that if the length of the nodes array is zero, this should be treated the same as not supplying a nodes property.
My current workaround is for my TreeNode typescript class to provide a trimNodes() function:
public trimNodes() {
if (this.nodes.length == 0) {
delete (this as any).nodes;
} else {
for (const node of this.nodes) {
node.trimNodes();
}
}
}
While this works, and is easy enough, it would be nice if bstreeview handled this internally.
Currently, if a given tree node has no children (but the
nodesarray is defined as empty), the expand/collapse icons still render. I believe that if the length of thenodesarray is zero, this should be treated the same as not supplying anodesproperty.My current workaround is for my
TreeNodetypescript class to provide atrimNodes()function:While this works, and is easy enough, it would be nice if bstreeview handled this internally.