Closed davidlaredodiaz closed 1 year ago
Hi 👋 thanks for providing reproduction steps.
It's not a bug it's a feature 🤣
Jokes aside, you are right that it's unexpected behavior and should be improved. It's not strictly a bug because the logic works as expected but rather incomplete implementation of the demo. The recursive nature makes it non-trivial to handle drops of a parent in one of the nested children.
I'll look into how the demo can handle this special case so it can serve as example.
I got the same problem, and wonder if someone already found a elegant solution to this problem? since its about a year ago now.
Hi. I found a solution to avoid that bug. Actually a trick, more than a solution :)
.dndDraggingSource { display: none; }
This style hide your dragging item (with its children) so you cannot drag holding item to its children list.
@chnselim good idea! It might be worthwile to try pointer-events:none;
style.
Stale issue (and probably fixed by now)
Describe the bug In nested example if we drag 'Got something nested' and drop inside itself, below 'MY_CUSTOM_DRAG_IMAGE' text, will disappear.
Steps to reproduce the behavior:
Expected behavior The Draggged & dropped 'Got something nested' node it would keep without any change.