react-sortablejs
react-sortablejs copied to clipboard
[bug] Sort property does not work properly
Describe the bug Changing sort property does not update functionality (sort is applied only onMount)
To Reproduce
<ReactSortable list={sort} setList={setList} sort={isSorting} >
Steps to reproduce the behavior:
- Create a button that can change state isSorting, and render this ReactSortable next to it
- By clicking on the button you are not changing functionality
Expected behavior that it will work
Information After looking into your code you are creating Sortable object after onmount => but not updating i think you should be able to update Sortable object by option(name:String[, value:*]) method
Versions - Look in your package.json
for this information:
react-sortable = 6.1.4
react = 18
I created a pull request solving this problem
And guys you should definitely commit your yarn.lock => now I cant even build it ... i had to upgrade @parcel library