Skip to content

Commit

Permalink
SlideMenu empty after model change Fixed #807
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 11, 2019
1 parent 567a568 commit 5063f3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/slidemenu/SlideMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,14 @@ export class SlideMenu extends Component {
}
}

componentDidUpdate(prevProps, prevState) {
if (this.props.model !== prevProps.model) {
this.setState({
level: 0
});
}
}

componentWillUnmount() {
this.unbindDocumentClickListener();
this.unbindDocumentResizeListener();
Expand Down

0 comments on commit 5063f3f

Please sign in to comment.