Skip to content

Commit

Permalink
fix(projects): fixed left menu mixed mode shrinks menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeng889 committed Sep 6, 2024
1 parent 0402b46 commit 77dacbd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/layouts/modules/global-menu/components/VerticalMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const VerticalMenu = memo(() => {

const openKeys = getSelectedMenuKeyPath(route.matched);

const isMix = themeSettings.layout.mode === 'vertical-mix';

const inlineCollapsed = useAppSelector(getSiderCollapse);

const [stateOpenKeys, setStateOpenKeys] = useState<string[]>(openKeys);
Expand Down Expand Up @@ -87,8 +89,8 @@ const VerticalMenu = memo(() => {
<SimpleScrollbar>
<AMenu
mode="inline"
items={themeSettings.layout.mode.includes('mix') ? childLevelMenus : allMenus}
inlineCollapsed={inlineCollapsed}
items={isMix ? childLevelMenus : allMenus}
inlineCollapsed={isMix ? false : inlineCollapsed}
openKeys={stateOpenKeys}
onOpenChange={onOpenChange}
selectedKeys={selectKey}
Expand Down

0 comments on commit 77dacbd

Please sign in to comment.