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

[bug] options are not dynamic / reactive

Open gregg-cbs opened this issue 4 years ago • 3 comments

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 avatar Apr 20 '21 07:04 gregg-cbs

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

bnabet avatar Mar 25 '23 11:03 bnabet

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

gregg-cbs avatar Mar 26 '23 17:03 gregg-cbs

Thanks for your answer !

bnabet avatar Mar 27 '23 00:03 bnabet