Commit 4186ba64 authored by afc163's avatar afc163

Fix menu collapsed behavior

parent 25c44114
...@@ -176,6 +176,11 @@ class BasicLayout extends React.PureComponent { ...@@ -176,6 +176,11 @@ class BasicLayout extends React.PureComponent {
const noticeData = this.getNoticeData(); const noticeData = this.getNoticeData();
// Don't show popup menu when it is been collapsed
const menuProps = collapsed ? {} : {
openKeys: this.state.openKeys,
};
return ( return (
<DocumentTitle title={this.getPageTitle()}> <DocumentTitle title={this.getPageTitle()}>
<Layout> <Layout>
...@@ -198,7 +203,7 @@ class BasicLayout extends React.PureComponent { ...@@ -198,7 +203,7 @@ class BasicLayout extends React.PureComponent {
<Menu <Menu
theme="dark" theme="dark"
mode="inline" mode="inline"
openKeys={this.state.openKeys} {...menuProps}
onOpenChange={this.handleOpenChange} onOpenChange={this.handleOpenChange}
selectedKeys={this.getCurrentMenuSelectedKeys()} selectedKeys={this.getCurrentMenuSelectedKeys()}
style={{ margin: '24px 0', width: '100%' }} style={{ margin: '24px 0', width: '100%' }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment