react-sortablejs
react-sortablejs copied to clipboard
Setting selected state initially
I would like to sync the multi drag selected state with an external component, so I'm setting the selected property manually on the items. This works except on initial load for which it seems like the values are overwritten for some reason.
There is a comment too, but it's not too clear for me why is this necessary.
https://github.com/SortableJS/react-sortablejs/blob/439c0da064731f333f867213eb3454e21d1b5c9e/src/react-sortable.tsx#L49
Thanks for the nice library!