Skip to content

Commit

Permalink
Merge pull request #36 from JakeSidSmith/props-update-fix
Browse files Browse the repository at this point in the history
Props update fix
  • Loading branch information
JakeSidSmith committed Jan 26, 2015
2 parents 95e63f7 + 74452d9 commit f63e72d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-reorderable",
"version": "1.0.0",
"version": "1.0.1",
"description": "Drag & drop, touch enabled, reorderable / sortable list, React component",
"homepage": "https://github.com/JakeSidSmith/react-reorderable",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-reorderable",
"version": "1.0.0",
"version": "1.0.1",
"description": "Drag & drop, touch enabled, reorderable / sortable list, React component",
"author": "Jake 'Sid' Smith",
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion reorderable.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,11 @@
clearInterval(this.afterScrollYInterval);
clearInterval(this.afterScrollXInterval);
},
getInitialState: function () {
componentWillReceiveProps: function (props) {
// Updates list when props changed
this.setState({list: props.list});
},
getInitialState: function () {
return {list: this.props.list || []};
},
render: function () {
Expand Down

0 comments on commit f63e72d

Please sign in to comment.