lukasbach / react-complex-tree

Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop
https://rct.lukasbach.com
MIT License
944 stars 74 forks source link

Collision with react-dnd #282

Closed rmapes closed 6 months ago

rmapes commented 1 year ago

Describe the bug When already using react-dnd in for drag and drop in other components, drag and drop in react-complex-tree does not work.

To Reproduce

  1. Implement react-dnd elsewhere in the code
  2. Implement a basic version of the tree from the getting started guide

Expected behavior Drag and drop should work as expected

Actual Behaviour Tree is rendered but does not respond to attempts to drag and drop with mouse

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context A possible workaround would be to provide a configuration option to use react-dnd as the drag and drop controller within react-complex-tree, preventing collision

lukasbach commented 9 months ago

Hm, yeah I can't really figure out what causes the problem, react-dnd seems to overwrite some dnd events that rct needs, but I'm not sure..

lukasbach commented 6 months ago

I unfortunately don't see any actionable things to do here, since I am not sure if the issue comes from this library or react-dnd, and I'm not sure if this is still relevant. I'll close this for now, feel free to reopen if you have additional information on this or believe this can be fixed through changes in react-complex-tree.