tree icon indicating copy to clipboard operation
tree copied to clipboard

Cannot drag a node into an empty folder

Open tukez opened this issue 4 years ago • 3 comments

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 avatar Dec 03 '21 06:12 tukez

@tukez are you able to find a way to enable dropping on a node with empty children?

Fatman007 avatar Sep 19 '22 06:09 Fatman007

@Fatman007 I create a temporary node during drag under the empty node to be able to drop it.

tukez avatar Oct 11 '22 12:10 tukez

@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

Fatman007 avatar Oct 12 '22 03:10 Fatman007