react-sortablejs icon indicating copy to clipboard operation
react-sortablejs copied to clipboard

Setting selected state initially

Open kmrsfrnc opened this issue 5 years ago • 0 comments

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!

kmrsfrnc avatar Jul 24 '20 08:07 kmrsfrnc