Skip to content

Commit 6aff277

Browse files
author
Caleb Everett
committed
set LeftNav docked in componentWillReceiveProps
1 parent ac357ec commit 6aff277

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/left-nav.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ const LeftNav = React.createClass({
8282
//from the parent / owner using context
8383
componentWillReceiveProps (nextProps, nextContext) {
8484
let newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme;
85-
this.setState({muiTheme: newMuiTheme});
85+
this.setState({
86+
muiTheme: newMuiTheme,
87+
open: (this.props.docked !== nextProps.docked) ? nextProps.docked : this.state.open,
88+
});
8689
},
8790

8891
componentDidMount() {

0 commit comments

Comments
 (0)