frontend-collective / frontend-collective/react-sortable-tree
shouldCopyOnOutsideDrop assumes the drop is on another tree
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
[CodeSandbox Bug](https://codesandbox.io/s/549w616qlk)
`shouldCopyOnOutsideDrop` is great functionality for using the tree nodes to drop on other things. The functionality seems to assume the drop is on another React-Sortable-Tree
In my situation, I want to be able to drag nodes over a form area, which will then display an edit form.
In react-sortable-tree.js `endDrag`, line 436 the logic for this occurs.
To prevent errors when dropping nodes on something other than a tree, the logic could something like:
from `if (!dropResult) {`
to `if (!dropResult || (shouldCopy && !dropResult.treeId)) {`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.