Incorrect drag position after state has been updated from sortable nested item #562
Replies: 3 comments 1 reply
-
Can you please share a reproduction in something like CodeSandbox? |
Beta Was this translation helpful? Give feedback.
-
@clauderic Hi, thank you for getting back to me! Here's my codepen: https://codesandbox.io/s/react-virtualized-list-yq1h7 On codepen, it seems to work as expected, but in my project environment it doesn't work as expected. I compared all the dependency version to the codesandbox and they are all the same. Any advice on what I should be checking? |
Beta Was this translation helpful? Give feedback.
-
@parkderick Hi Derick, I had the same issue and after investigation, it was caused by the items provided was always the same array. That caused the SortableContext to not be able to refresh the underlying list of items and provide the current index (then defaulting to -1) Before: After I don't think it's a bug, but it might be worth documenting this somewhere |
Beta Was this translation helpful? Give feedback.
-
Hi, I found a potential bug where the position of the draggable is positioned incorrectly after updating the state while a draggable is still in action. FYI I am using react-virtualized for the lists
In my case, I have lists sorted vertically and cards within each list sorted horizontally. When I drag a card from one list to another, I update the state of the items so that the new list has the card.
But this leads to unexpected incorrect draggable positions.
Not sure what I'm doing wrong. Any advice would be much appreciated! Thank you!
Screen.Recording.2021-11-29.at.12.14.35.PM.mov
Beta Was this translation helpful? Give feedback.
All reactions