We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d25b56 commit 570b8fdCopy full SHA for 570b8fd
src/index.jsx
@@ -33,7 +33,6 @@ module.exports = class extends React.Component {
33
options: {},
34
tag: 'div'
35
};
36
-
37
sortable = null;
38
39
componentDidMount() {
@@ -84,6 +83,12 @@ module.exports = class extends React.Component {
84
83
85
this.sortable = Sortable.create(ReactDOM.findDOMNode(this), options);
86
}
+ componentWillUnmount() {
87
+ if (this.sortable) {
88
+ this.sortable.destroy();
89
+ this.sortable = null;
90
+ }
91
92
render() {
93
const { children, className, tag } = this.props;
94
return React.DOM[tag]({ className }, children);
0 commit comments