Closed sweco-sedalh closed 1 year ago
Hi @sweco-sedalh! Thanks for your report. This should now be working as of v2.0.0, please see this storybook as an example: https://rct.lukasbach.com/storybook/?path=/story/core-basic-examples--drop-on-empty-tree
Please note that the drag-over needs to be performed over the tree container component for it to register on empty trees, so the tree container component needs a minimum height for it to work. You can customize this by giving a minimum height to the component rendered with renderTreeContainer
which receives the containerProps
.
Thanks, I can can confirm that this issue is resolved in 2.0.0!
Describe the bug
Can't drop items on an empty tree (without any items).
To Reproduce Steps to reproduce the behavior:
<Tree />
s, one of which is emptyhttps://codesandbox.io/s/react-complex-tree-playground-forked-96pwzt
Expected behavior A clear and concise description of what you expected to happen.
Dropping can happen on any part of the tree. Setting
{min-,}{height,width}
can be used to set a size for an empty tree, the entire of which is a valid drop target.Screenshots
Desktop (please complete the following information):
Additional context