Don't open menu when sidebar is collapsed

This commit is contained in:
Piotr Rogowski 2021-03-23 10:44:01 +01:00
parent 4498011654
commit 9ee6514723
No known key found for this signature in database
GPG Key ID: F40F61D5587F5673
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ const SideBar = ({
<PerfectScrollbar options={{ suppressScrollX: true }}>
<Menu
defaultSelectedKeys={[matchedPath.url]}
defaultOpenKeys={[`/${matchedPath.params.category}`]}
defaultOpenKeys={ui.sidebarCollapsed ? [] : [`/${matchedPath.params.category}`]}
mode="inline"
style={{ height: '100%' }}
key={matchedPath.url}