react-sortablejs
react-sortablejs copied to clipboard
[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);
}}