frontend-collective / frontend-collective/react-sortable-tree
canDrop prop doesnt work when tree is empty
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
The canDrop prop should still work when the tree is empty. As of right now if the tree is empty you can always drop something into it. If there is a condition where I don't want to be able to drop something into an empty tree then I should be able to use canDrop to set that.
Thanks,
Maria
I have set can drop of my tree to false:

I have 2 trees, the bottom tree which is empty right now has canDrop set to false:

I am still able to drop something into it even though can drop is set to false:

The canDrop prop does not work when the tree is empty, you can always drop something into an empty tree. Once the tree is no longer empty the canDrop prop actually works and I am no longer able to drop something into the tree.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.