Browse Source

Merge pull request #571 from jquense/jquense-patch-1

Add `getContainer` option for better react version support
pull/572/head
Lebedev Konstantin 9 years ago
parent
commit
36c0768eba
  1. 8
      react-sortable-mixin.js

8
react-sortable-mixin.js vendored

@ -35,7 +35,11 @@
onRemove: 'handleRemove',
onSort: 'handleSort',
onFilter: 'handleFilter',
onMove: 'handleMove'
onMove: 'handleMove',
getContainer: function(component){
/** @namespace this.refs — http://facebook.github.io/react/docs/more-about-refs.html */
return (component.refs[options.ref] || component).getDOMNode()
}
};
@ -132,7 +136,7 @@
/** @namespace this.refs — http://facebook.github.io/react/docs/more-about-refs.html */
this._sortableInstance = Sortable.create((this.refs[options.ref] || this).getDOMNode(), copyOptions);
this._sortableInstance = Sortable.create(copyOptions.getContainer(this), copyOptions);
},
componentWillReceiveProps: function (nextProps) {

Loading…
Cancel
Save