Skip to content

Any way to debug? #133

Answered by clauderic
growthwp asked this question in Q&A
Mar 14, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

So, the way dndkit seems to work is that you need to keep track of if a draggable was dropped or not yourself. I was under the assumption that would be automatic, as in, if I drag a draggable into a container, it would automatically insert itself.

That's correct, the library follows the declarative nature of React, and gives full control over to consumers as to whether or not items should be moved from one container to another on drop.

The library itself simply facilitates detecting which draggable was picked up, whether it is moved over a droppable, and where it was dropped. It does not move draggable elements for consumers from one position in the React tree to another. Doing so would…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@growthwp
Comment options

@growthwp
Comment options

@ranbena
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by clauderic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants