You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to use your smooth-dnd for a hierarchical data set but if I have more than 1 deep nesting I get onDrop events for all containers and not just the source and destination.
I have modified your demo to include an extra nesting and this results in the following dropResults :
container 3 : removedIndex: null, addedIndex: 0
container 2 : removedIndex: null, addedIndex: 2
container 1 : removedIndex: 4, addedIndex: 4
I would have expected
container 3 : removedIndex: null, addedIndex: 0
container 1 : removedIndex: 4, addedIndex: null
I have attached the modified file for clarification
Hi @crouchingkiwi,
Its because you are using the same groupName for all nested containers. This means that the containers can exchange draggables between each other. I dont know if you intended to do this particular scenario but exchanging draggables between nested containers is not supported completely right now and can cause bugs. removing groupName props and making them self contained containers fixes the issue. But I will try to enhance the code to support this behavior in the future releases.
Hi @kutlugsahin
Thanks for getting back to me. Yes, the intention was to be able to drag between any level of nesting, for example a directory hierarchy of file/photo objects. Thanks for your support and look forward to a future release.
Hi
I have been trying to use your smooth-dnd for a hierarchical data set but if I have more than 1 deep nesting I get onDrop events for all containers and not just the source and destination.
I have modified your demo to include an extra nesting and this results in the following dropResults :
I would have expected
I have attached the modified file for clarification
Thanks
nested.zip
ps Works really nicely otherwise, great module
The text was updated successfully, but these errors were encountered: