diff --git a/src/components/AsideHeader/useAsideHeaderInnerContextValue.tsx b/src/components/AsideHeader/useAsideHeaderInnerContextValue.tsx index 0459c9c..4c1cc2e 100644 --- a/src/components/AsideHeader/useAsideHeaderInnerContextValue.tsx +++ b/src/components/AsideHeader/useAsideHeaderInnerContextValue.tsx @@ -39,6 +39,7 @@ export const useAsideHeaderInnerContextValue = ( event: React.MouseEvent, ) => { if (item.id === ALL_PAGES_MENU_ITEM.id) { + onClosePanel?.(); setInnerVisiblePanel((prev) => prev === InnerPanels.AllPages ? undefined : InnerPanels.AllPages, ); @@ -47,7 +48,7 @@ export const useAsideHeaderInnerContextValue = ( } item.onItemClick?.(item, collapsed, event); }, - [innerOnClosePanel, ALL_PAGES_MENU_ITEM], + [innerOnClosePanel, ALL_PAGES_MENU_ITEM, onClosePanel], ); const innerMenuItems = useMemo(