dnd-kit
dnd-kit copied to clipboard
There is a problem with the sorting animation for items of different sizes.
I'm using SortableContext to implement drag functionality. There is a problem with the sorting animation for items of different sizes. Is there any way to fix this?
https://user-images.githubusercontent.com/39724729/202113093-288e6f63-8739-45fc-8a10-607216eb2ad3.mov
This official example from the storybook might help you.
For the implementation I guess we have to reverse-engineer the source code of these stories.
When you pass the transform
prop, just make sure that you sent the resulting scaleY
to 1
.
transform: CSS.Transform.toString(transform && { ...transform, scaleY: 1 })
Or CSS.Translate.toString()
(#817)
I'm wondering why there are scales.
I'm running into the same issue and am curious as to why there are scales in here as well.
such approach helps:
const style = { transform: CSS.Translate.toString(transform), transition } as CSSProperties
Any updates ?