tree
tree copied to clipboard
Cannot drag a node into an empty folder
In the demos, if you drag all the nodes out of a folder, you cannot drag anything back into the folder anymore (since the folder turns to a leaf node).
In other words, it seems the dropPosition is never 0 for leaf nodes? How can I drag a node into an empy folder?
@tukez are you able to find a way to enable dropping on a node with empty children?
@Fatman007 I create a temporary node during drag under the empty node to be able to drop it.
@tukez thanks for the reply, yes i also cannot find a way or props that could solve this problem and need to add placeholder node on every empty parent node, then change the display to none, but it looks kinda bad because there's a brief period when the placeholder node still visible and then disappear, it will change the node positions, i tried a workaround by using the treeData as a children of Tree component but got deprecation warning