SortableJS/react-sortablejs

[bug] Why setList exec once when mounted ?

vaynevayne opened this issue · 1 comments

[bug] Why setList exec once when mounted ?

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);
      }}