From b8db8371a3b7d9099fa4d67f403e55a6f33e457e Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 16 Jun 2021 09:23:24 +0800 Subject: [PATCH] fix sidebar issues --- spug_web/src/layout/Sider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) } }