Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] options are not dynamic / reactive #211

Open
gregg-cbs opened this issue Apr 20, 2021 · 3 comments
Open

[bug] options are not dynamic / reactive #211

gregg-cbs opened this issue Apr 20, 2021 · 3 comments

Comments

@gregg-cbs
Copy link

gregg-cbs commented Apr 20, 2021

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:

  1. Add sort={isSortingEnabled} to ReactSortable
  2. Change isSortingEnabled from false to true
  3. 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!

@gregg-cbs gregg-cbs changed the title [bug] sort option not dynamic / reactive [bug] options are not dynamic / reactive Apr 20, 2021
@bnabet
Copy link

bnabet commented Mar 25, 2023

Wow 2 years and still no update... Have to change library I think :(

@gregg-cbs
Copy link
Author

@bnabet - I switched to and managed to build my product:
React Beautiful DND

@bnabet
Copy link

bnabet commented Mar 27, 2023

Thanks for your answer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants