clauderic / clauderic/react-sortable-hoc
Downward item get weird animation behavior
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 959
- PR merge metrics
- No merged PRs in 30d
Description
Hi! I'm using react-sortable-hoc with [antd table](https://ant.design/components/table/#components-table-demo-drag-sorting-handler),
I need sortable limit more clear for user, so I customize some border like this 👇

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... ❌

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

### ⭐️ My workaround
Add `transition: none !important` to ignore animate when drag end.
```css
.ignoreSortingAnimation :global .ant-table-tbody tr {
transition: none !important;
}
```
- ### customize with collection border
⚠️ workaround has been comment
[](https://codesandbox.io/s/sweet-yonath-mii86?file=/src/SortableTable.js)
- ### render `DraggableContainer` inside `render`
downward item weird animation gone, but can't setState in `onSortStart` and `onSortEnd`
[](https://codesandbox.io/s/inspiring-stallman-xpsfi?file=/src/SortableTable.js)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.