-
Notifications
You must be signed in to change notification settings - Fork 156
Library kills other Drag / Drop behavior #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I found out that in one of the latest updates the HTML5Backend dependance that they use here it is possible to pass a root element that will allow 'localization' of this behavior only to the chosen component. Hopefully someone can fix it. |
@Arthur-Ruthenberg thanks for the comment. Because I don't feel like I fully caught your message, let me ask: are you having this problem in your app with react-arborist? Or are you helping suggest a solution for how we might fix this? |
@jameskerr I dug a little further within the react-dnd-HTML5Backend and they said there that sometime during the 2021 they made an improvement to the library to allow passing of a 'root' object to the dnd provider and it is supposed to fix this bug. |
Thank you for the research. Now I understand the issue. I do know of the "root" option you are referring to. If you are in a hurry, I'd welcome a contribution to react-arborist that adds a "dndRoot" option to the props and passes it to the react-dnd provider. Otherwise, I'll work on this as I have time. Thanks for your help! |
This is an issue with reactDnd: react-dnd/react-dnd#3344 This is unfortunate. I will add a prop to the Tree component called |
@Arthur-Ruthenberg in the latest release (version 1.1.0) you can pass a dndRootElement prop to the tree to scope the event listeners. Let me know if that works for you! |
@jameskerr Thank you! |
dndRootElement={document.getElementById('arborist-tree-wrapper')} Whoa! This should be MUCH more advertised as a "gotcha" to watch out for. This single line solved a 1.5 day bug I was fighting. Thanks for a great library! |
It's reported that this happens. I am also aware that there can only be one instance of html5 backend on the page at once.
The text was updated successfully, but these errors were encountered: