frontend-collective / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://frontend-collective.github.io/react-sortable-tree/
MIT License
4.9k stars 903 forks source link

Bug: I can't use draggable="true" (HTML Drag and Drop API) in others places #863

Open malestroms opened 3 years ago

malestroms commented 3 years ago

Hi all,

I just start working on another component that is rendering at the same time as the one that is using this one. So I'm basically doing a list and adding the attribute draggable="true", the problem is that is not working unless I turn off react-sortable-tree, so looks to me that react-sortable-tree is taking over the events or something not allowing to any other element with draggable="true" works as expected.

list e.g:

<ul>
   <li draggable="true">AAA</li>
   <li draggable="true">BBB</li>
   <li draggable="true">CCC</li>
<ul>

Any suggestions or workaround of this? there is a way to "reactivate" the event that is checking drags on the page? or something ? any help will be appreciate it

Thanks!!

Dmitry-Ostashev commented 3 years ago

I faced with the same problem. This workaround helped me: https://github.com/react-dnd/react-dnd/issues/2868#issue-745819161