Skip to content

Commit

Permalink
fix: close other panels when all pages panel opening
Browse files Browse the repository at this point in the history
  • Loading branch information
jigetus committed Jul 29, 2024
1 parent f64d3da commit abb6a82
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const useAsideHeaderInnerContextValue = (
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
) => {
if (item.id === ALL_PAGES_MENU_ITEM.id) {
onClosePanel?.();
setInnerVisiblePanel((prev) =>
prev === InnerPanels.AllPages ? undefined : InnerPanels.AllPages,
);
Expand All @@ -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(
Expand Down

0 comments on commit abb6a82

Please sign in to comment.