Skip to content

Commit

Permalink
Now keeps expanded state between renderings
Browse files Browse the repository at this point in the history
  • Loading branch information
marushkevych committed Jan 24, 2015
1 parent a40a45a commit 021cae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var Tree = React.createClass({displayName: "Tree",
return this.state != nextState;
},
getInitialState: function() {
// if we saved the expand state to the moel - use it
// if we saved the expand state to the model - use it
if(this.props.data.expand != null){
return {expanded: this.props.data.expand};
}
Expand Down

0 comments on commit 021cae6

Please sign in to comment.