Skip to content

Commit

Permalink
Merge pull request mui#2044 from CalebEverett/master
Browse files Browse the repository at this point in the history
[LeftNav] Open or close if docked prop changes when window resizes
  • Loading branch information
oliviertassinari committed Nov 9, 2015
2 parents bb57b9f + 6aff277 commit 49feb2e
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 @@ -83,7 +83,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 49feb2e

Please sign in to comment.