Sortable animations don't work on latest release.
Hi, I'm new to the library so excuse me if this is already being discussed. I couldn't find an open issue. Expected: https://codesandbox.io/s/mh95t?file=/package.json Actual behaviour: https://codesandbox.io/s/dnd-kit-sort-demo-forked-irhhk?file=/package.json
id must be a string, not a number https://codesandbox.io/s/dnd-kit-sort-demo-forked-r3n3e
@clauderic Could you put some some light why it changed to be a string? I think it's common to have numeric ids in apps. I'm debugging problems with upgrade in my app and I'm not sure if it is caused by this change or not.
The documentation always explicitly stated that the id for draggable / droppable / sortable items had to be a string. It was a happy accident if it was working.
If your ids are numbers, just convert them to strings using toString:
[1,2,3].map(id => id.toString())
@clauderic I'm going through documentation and I cannot find a mention about a hard requirement about string items. I can see it in examples as strings, but I guess it might be a common mistake made by end users, even more that in the examples there is an "id" name used, which most of the time is numeric in apps.
Is it making some big problems in the code to support numeric items?
This is documented in multiple places:
It's probably not a major change to support this, you're welcome to open a PR if you want this to happen.
String IDs are a huge mess for anyone whose data comes from a database. It means type conversions all over the place, and when I miss one (I have to convert in both directions assuming my application code that runs e.g. on drag end uses numeric IDs) I don't even get a useful error but just broken behavior.