Skip to content

Commit

Permalink
set LeftNav docked in componentWillReceiveProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Everett committed Nov 8, 2015
1 parent ac357ec commit 6aff277
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ const LeftNav = React.createClass({
//from the parent / owner using context
componentWillReceiveProps (nextProps, nextContext) {
let newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme;
this.setState({muiTheme: newMuiTheme});
this.setState({
muiTheme: newMuiTheme,
open: (this.props.docked !== nextProps.docked) ? nextProps.docked : this.state.open,
});
},

componentDidMount() {
Expand Down

0 comments on commit 6aff277

Please sign in to comment.