react-sortablejs
react-sortablejs copied to clipboard
[bug] options are not dynamic / reactive
Describe the bug
When adding sort, disabled and possibly other options to ReactSortable and assigning it a state property to toggle sort, it does not toggle when the state changes.
const [isSortingEnabled, setIsSortingEnabled] = useState(false);
<ReactSortable
sort={isSortingEnabled}
>
To Reproduce Steps to reproduce the behavior:
- Add
sort={isSortingEnabled}to ReactSortable - Change
isSortingEnabledfromfalsetotrue - Notice sort is not enabled
Expected behavior Sort to be toggle when state changes
Information This is required. Issues without this critical information will be closed.
Versions - Look in your package.json for this information:
react-sortable = ^1.13.0
react = ^16.13.1
Thanks!
Wow 2 years and still no update... Have to change library I think :(
@bnabet - I switched to and managed to build my product: React Beautiful DND
Thanks for your answer !