diff --git a/src/react-sortable.tsx b/src/react-sortable.tsx index 81dd0f5..f8546d0 100644 --- a/src/react-sortable.tsx +++ b/src/react-sortable.tsx @@ -71,6 +71,11 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl const newOptions = this.makeOptions(); Sortable.create(this.ref.current, newOptions); } + componentDidUpdate(prevProps: ReactSortableProps): void { + if (prevProps.disabled !== this.props.disabled && this.sortable) { + this.sortable.option("disabled", this.props.disabled); + } + }; render(): JSX.Element { const { tag, style, className, id } = this.props;