diff --git a/spug_web/src/layout/Sider.js b/spug_web/src/layout/Sider.js index c5bdabbb..098720f5 100644 --- a/spug_web/src/layout/Sider.js +++ b/spug_web/src/layout/Sider.js @@ -48,7 +48,7 @@ export default function Sider(props) { const openKey = OpenKeysMap[tmp]; if (openKey) { selectedKey = tmp; - if (openKey !== 1 && !openKeys.includes(openKey)) { + if (openKey !== 1 && !props.collapsed && !openKeys.includes(openKey)) { setOpenKeys([...openKeys, openKey]) } }