This commit is contained in:
Ritesh Kumar committed 2017-08-31 22:05:56 +05:30
1 parent c52a4e52fa
commit ea62608e96
1 file changed
+5
+5
View File
@@ -215,6 +215,10 @@ export default class Layout extends PureComponent {
return path === this.props.pathname ? "active" : "";
}
componentWillMount() {
this.setKey(this.props.pathname)
}
componentDidMount() {
this.setKey(this.props.pathname);
}
@@ -412,6 +416,7 @@ export default class Layout extends PureComponent {
onChange={this.onChange}
accordion
activeKey={this.state.activeKey}
defaultActiveKey={this.state.activeKey}
>
{x.map((route, i) => {
return (