mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
🐛 site menu open bug
This commit is contained in:
parent
811dde03d4
commit
1a0cea28a3
@ -70,10 +70,13 @@ export default class MainContent extends React.PureComponent {
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
return {
|
||||
...state,
|
||||
openKeys: getSideBarOpenKeys(props),
|
||||
};
|
||||
if (!state.openKeys) {
|
||||
return {
|
||||
...state,
|
||||
openKeys: getSideBarOpenKeys(props),
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
@ -259,7 +262,7 @@ export default class MainContent extends React.PureComponent {
|
||||
inlineIndent="40"
|
||||
className="aside-container menu-site"
|
||||
mode="inline"
|
||||
defaultOpenKeys={openKeys}
|
||||
openKeys={openKeys}
|
||||
selectedKeys={[activeMenuItem]}
|
||||
onOpenChange={this.handleMenuOpenChange}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user