-
Notifications
You must be signed in to change notification settings - Fork 217
[bug] options are not dynamic / reactive #211
Copy link
Copy link
Open
Description
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels