react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

Downward item get weird animation behavior

Open sky172839465 opened this issue 5 years ago • 0 comments

Hi! I'm using react-sortable-hoc with antd table, I need sortable limit more clear for user, so I customize some border like this 👇

Screen Shot 2020-10-08 at 8 44 12 PM

A few later I found a weird animation behavior when downward item, I think maybe it cause by didn't create DraggableContainer inside render, but I can't create DraggableContainer inside render, beacuse rerender DraggableContainer will unmount itself, that will cause onSortStart and onSortEnd setState throw lifecycle error... ❌

weird behavior

I also check dev tool downward item y axis pixel is correct, is it necessary create DraggableContainer inside render ?

out

⭐️ My workaround

Add transition: none !important to ignore animate when drag end.

.ignoreSortingAnimation :global .ant-table-tbody tr {
  transition: none !important;
}
  • customize with collection border

    ⚠️ workaround has been comment Play ground
  • render DraggableContainer inside render

    downward item weird animation gone, but can't setState in onSortStart and onSortEnd Play ground

sky172839465 avatar Oct 08 '20 13:10 sky172839465