clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
http://dndkit.com
MIT License
12.86k stars 640 forks source link

Under the "sortable" module, elements with different heights cannot be sorted effectively. #1289

Open Ryuurock opened 10 months ago

Ryuurock commented 10 months ago

https://github.com/clauderic/dnd-kit/assets/25604544/58282b99-1fe0-4dd7-8d4c-7fd7769f312f

sandbox: https://codesandbox.io/p/sandbox/dndkit-sortable-8km3q7?file=%2Fsrc%2FApp.js%3A63%2C6

dicrescenzoa commented 10 months ago

Looking at this issue since I've found the same problem when having draggable item with height depending from the content.

omar-shahid commented 5 months ago

I'm facing the same issue, has anyone found a solution?

chenxuanzong commented 3 months ago

Same problem.

musetraine commented 1 month ago

same issue, any solution?

musetraine commented 1 month ago

Whoever encounters this bug try adding this collisionDetection={closestCenter} to DndContext