How do you implement canExpand? With the file-browser analogy, I do not want to offer expanded file nodes during drag and drop. Yes, it is displayed in red, if you implement canDrop, but I'd like a "file" like node to not even expand, as it's only ever meant to be a leaf node.
hi @hyperknot.
If you set the expanded property on each node to false in treeData prop and also on onChange call backs. then the node with expanded set to false would never expand.
Hope that helps!
Hi @wuweiweiwu,
I've set expanded to false for each "file" like node, didn't make a difference. onChange is only run after a drop has happened, thus I cannot see how would it avoid opening file like nodes while dragging.

oh I see.I think we would need to add a new attribute (ie canExpand) that decides if a node can be expanded or not. and that attribute will be check during the drag phase
@wuweiweiwu , @hyperknot I will post a pr for this
@lifejuggler still planning to do a PR?
sorry I just moved to a new job and been super busy... you can do it
Most helpful comment
@wuweiweiwu , @hyperknot I will post a pr for this