We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65abfee commit b60ae8eCopy full SHA for b60ae8e
1 file changed
README.md
@@ -117,15 +117,24 @@ import Sortable from 'react-sortablejs';
117
118
class MySortableList extends React.Component {
119
static propTypes = {
120
+ sortableInstance: React.PropTypes.object,
121
items: React.PropTypes.array
122
};
123
static defaultProps = {
124
+ sortableInstance: null
125
items: []
126
127
state = {
128
items: this.props.items
129
130
131
+ componentDidUpdate() {
132
+ // Note: sortableInstance object is null for the initial render
133
+ const { sortableInstance } = this.props;
134
+
135
+ // See supported instance methods at https://github.com/RubaXa/Sortable#method
136
+ console.log(sortableInstance.toArray());
137
+ }
138
handleStart(evt) { // Dragging started
139
}
140
handleEnd(evt) { // Dragging ended
0 commit comments