outl1ne / nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag & drop.
MIT License
284 stars 120 forks source link

dragging rows often creates duplicate entries (visually) #134

Closed a-chaudhari closed 2 years ago

a-chaudhari commented 2 years ago

nova-sortable 3.1.0 nova 4.12.13 laravel 8.83.23 chrome 103.0.5060.134

There is an issue in nova-sortable in 3.x that wasn't present on 2.x. When clicking and dragging around rows it'll often duplicate the row. Thankfully this is only a visual bug as refreshing the page restores the correct count and expected positions.

Reproducing it isn't exact. But it's fairly straightforward if you click and drag rows to near the bottom of the list. Doing it quickly appears it make it more likely.

In the below screenshot, I moved #7 down to between 9 and 10. Seems like maybe the original entry wasn't removed from the local state which shows up as a duplicate value?

I disabled all other 3rd party nova packages to ensure no weird conflicts.

novasortabledups

rv-csanford commented 2 years ago

I am also getting this issue!

milewski commented 2 years ago

Same issue

kristher1619 commented 2 years ago

Same here

zwok commented 2 years ago

Hi, I have the same issue

Tarpsvo commented 2 years ago

Thanks for reporting this! Fixed in version 3.2.0. :)