evancz / elm-sortable-table

Sortable tables for whatever data you want to display
http://package.elm-lang.org/packages/evancz/elm-sortable-table/latest
BSD 3-Clause "New" or "Revised" License
283 stars 65 forks source link

Table rows are mis-ordered #2

Closed dimbleby closed 8 years ago

dimbleby commented 8 years ago

I've put together a repo demonstrating the issue here with instructions in the README - let me know if this is unclear.

Note that it does take exactly the described clicks, in that order, to demonstrate the problem - but it's then completely reproducible for me.

I find it hard to see how this can be a bug in the elm-sortable-table code, but I guess this is the right place to start.

I'm using elm 0.17.1

justinmimbs commented 8 years ago

The reordering bug looks due to the way VirtualDom reorders keyed nodes. I opened an issue on virtual-dom: https://github.com/elm-lang/virtual-dom/issues/32

evancz commented 8 years ago

Great, thanks @justinmimbs! Let's follow along there instead.

evancz commented 8 years ago

Alright, the original issue should be resolved if you hard refresh on the examples hosted on this repo. Otherwise, if you rebuild your projects with virtual-dom 1.1.1 you should get the fix in anything else.

Thanks for the report!

dimbleby commented 8 years ago

ack - thanks both @evancz for the fix, and @justinmimbs for reducing my example to something more bite-sized