Skip to content

Commit 8647935

Browse files
author
Mauro Della Chiesa
committed
Replaced ReacDOM.findDOMNode by using ref
1 parent 191f263 commit 8647935

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Sortable.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Sortable extends Component {
8282
};
8383
});
8484

85-
this.sortable = SortableJS.create(ReactDOM.findDOMNode(this), options);
85+
this.sortable = SortableJS.create(this.node, options);
8686
}
8787
componentWillUnmount() {
8888
if (this.sortable) {
@@ -97,7 +97,7 @@ class Sortable extends Component {
9797
delete props.onChange;
9898

9999
return (
100-
<Component {...props} />
100+
<Component {...props} ref={(node) => { return this.node = node; }} />
101101
);
102102
}
103103
}

0 commit comments

Comments
 (0)