Skip to content

Commit e6886b3

Browse files
fix(nav): fix collision of nav collapse state keys (#1918) (#1919)
(cherry picked from commit 2173aaa) Co-authored-by: Andrew Azores <[email protected]>
1 parent bc72899 commit e6886b3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/app/AppLayout/AppLayout.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,15 +611,16 @@ export const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
611611
} else if (!renderables.length) {
612612
items = [];
613613
} else {
614+
const navKey = `${group}.${k}`;
614615
const anyActive = rs.some((r) => isActiveRoute(r));
615616
items = [
616617
<NavExpandable
617-
key={k}
618+
key={navKey}
618619
title={t(k)}
619-
groupId={k}
620+
groupId={navKey}
620621
isActive={anyActive}
621-
isExpanded={navExpandedStates[k] ?? true}
622-
onExpand={handleNavExpand(k)}
622+
isExpanded={navExpandedStates[navKey] ?? true}
623+
onExpand={handleNavExpand(navKey)}
623624
>
624625
{renderables}
625626
</NavExpandable>,

0 commit comments

Comments
 (0)