Open BeemWex opened 2 months ago
was also running into this issue, there is a workaround for this explained here 👉 https://github.com/clauderic/dnd-kit/issues/336#issuecomment-864564264
useSortable({
id: item.id,
animateLayoutChanges: () => false, // <- add this line
});
the docs explaining animateLayoutChanges
still needs to be added https://github.com/clauderic/dnd-kit/issues/1022#issuecomment-2060764681
When using
rectSwappingStrategy
andarraySwap
on dropping an item that's further away than a direct neighbour has some unnecessary animation.See this sandbox: https://codesandbox.io/p/sandbox/react-dnd-kit-swapping-order-forked-myd3wh
If you drag from 1-2, 4-3, or diagonal from 3-2 they all animate fine on dropping (swapping neighbours) If you drag from 1-4 or from 3-1 an unnecessary animation is visible (swapping distant items)
Does anyone have a temporary-fix?