dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

Stable SortableContext issue

Open sno6 opened this issue 1 year ago • 2 comments

I just ran into an issue that is perfectly summarised here.

You essentially get to re-order your list of items once and then it stops working. The problem is something to do with SortableContext, and the solution is to trigger it to remount (?) by passing in a different key.

As this took several hours to discover and is incredibly non-obvious I feel like an issue should be made. At the very least I would love to learn why this is occurring.

sno6 avatar Oct 30 '24 00:10 sno6

I've just bumped into this also. You're workaround works perfectly for me (in the link).

Oddly, when running in Storybook this issue doesn't exists. When running in the Next.js app this workaround was required.

@sno6 Did you get any further with this?

philostler avatar May 21 '25 11:05 philostler

@philostler No sorry, we moved to https://github.com/atlassian/pragmatic-drag-and-drop

sno6 avatar May 21 '25 22:05 sno6