SortableJS / react-sortablejs

React bindings for SortableJS
http://sortablejs.github.io/react-sortablejs/
MIT License
2.05k stars 209 forks source link

[bug] Why setList exec once when mounted ? #277

Open vaynevayne opened 1 year ago

aiboost commented 4 months ago

I agree. It's sad that we need to use such inelegant workaround like:

private isSettingListOnMount = true;

....

      setList={(newList) => {
          if (this.isSettingListOnMount) {
              this.isSettingListOnMount = false;
              return;
          }
          this.props.onChange(newList);
      }}