DEV Community

Discussion on: Drag and drop with Svelte using svelte-dnd-action

Collapse
 
isaachagoel profile image
Isaac Hagoel

what do you mean? of course it works. In my company we are using it with data from all kinds of sources all of the time. Feel free to make an issue with an example in github and I could have a look

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

Sure here a codesanbox with the example. I need to say that I'm new at Svelte coming from React so I'm sure I'm missing something would be awesome if you could take a look, thanks! codesandbox.io/s/svelte-api-dnd-9wzpe PS. the codesanbox is a bit buggy you need to refresh it in order to show the app.

Thread Thread
 
isaachagoel profile image
Isaac Hagoel

line 30 should be {#each items as todo(todo.id)}
you are iterating over a variable you are not updating in handleSort

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

thanks