diff --git a/src/components/InteriorLeftNav/InteriorLeftNav.js b/src/components/InteriorLeftNav/InteriorLeftNav.js index f5ad6e7..2d59ce7 100644 --- a/src/components/InteriorLeftNav/InteriorLeftNav.js +++ b/src/components/InteriorLeftNav/InteriorLeftNav.js @@ -12,6 +12,7 @@ export default class InteriorLeftNav extends Component { className: PropTypes.string, activeHref: PropTypes.string, onToggle: PropTypes.func, + open: PropTypes.bool, }; static defaultProps = { @@ -21,13 +22,16 @@ export default class InteriorLeftNav extends Component { state = { activeHref: this.props.activeHref || (window.location && window.location.pathname), - open: true, + open: typeof this.props.open !== 'undefined' ? this.props.open : true, }; componentWillReceiveProps = nextProps => { if (nextProps.activeHref) { this.setState({ activeHref: nextProps.activeHref }); } + if (typeof nextProps.open != 'undefined') { + this.setState({ open: nextProps.open }); + } }; handleItemClick = (evt, href) => {