diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html
index 6c633649c..03d5c43f8 100644
--- a/.storybook/preview-head.html
+++ b/.storybook/preview-head.html
@@ -1,5 +1,5 @@
-
+
diff --git a/.storybook/preview.js b/.storybook/preview.js
index ea80bc17e..176e56aed 100644
--- a/.storybook/preview.js
+++ b/.storybook/preview.js
@@ -14,7 +14,7 @@ const preview = {
}
},
stackblitzAdditionalDependency: {
- "@ironsource/fusion-ui": '5.6.3'
+ "@ironsource/fusion-ui": '5.7.15'
},
viewMode: 'story',
docs: {inlineStories: true},
diff --git a/projects/fusion-ui/components/layout/v4/layout.component.ts b/projects/fusion-ui/components/layout/v4/layout.component.ts
index d210a14b1..71769fb9c 100644
--- a/projects/fusion-ui/components/layout/v4/layout.component.ts
+++ b/projects/fusion-ui/components/layout/v4/layout.component.ts
@@ -129,6 +129,8 @@ export class LayoutComponent implements OnInit, OnDestroy {
if (itemFound) {
this.navigationMenu.setActiveMenu(primaryItemFound, itemFound);
this.menuItemSelectedByRoute.emit(itemFound);
+ } else {
+ this.navigationMenu.setActiveMenu(null, null);
}
return !!itemFound;
}
diff --git a/projects/fusion-ui/components/navigation-menu/v4/navigation-menu.component.ts b/projects/fusion-ui/components/navigation-menu/v4/navigation-menu.component.ts
index 2e1669fbd..e590d31ce 100644
--- a/projects/fusion-ui/components/navigation-menu/v4/navigation-menu.component.ts
+++ b/projects/fusion-ui/components/navigation-menu/v4/navigation-menu.component.ts
@@ -171,12 +171,18 @@ export class NavigationMenuComponent implements OnInit {
}
setActiveMenu(primary: PrimaryMenuItem, secondary: MenuItem) {
- this.selectedPrimaryMenuItem = primary;
- this.preSelectedPrimaryMenuItem = primary;
- this.selectedSecondaryMenuItem = secondary;
- this.setSecondaryMenu(primary);
- this.primaryMenu.setSelectedPrimaryMenuItem(primary);
- this.primaryMenu.setColorTheme(primary?.cssTheme ?? null);
+ if (isNullOrUndefined(primary) || isNullOrUndefined(secondary)) {
+ this.secondaryMenu.setSelected(null);
+ } else {
+ this.selectedPrimaryMenuItem = primary;
+ this.preSelectedPrimaryMenuItem = primary;
+ this.selectedSecondaryMenuItem = secondary;
+ this.setSecondaryMenu(primary);
+ this.primaryMenu.setSelectedPrimaryMenuItem(primary);
+ setTimeout(() => {
+ this.primaryMenu.setColorTheme(primary?.cssTheme ?? null);
+ });
+ }
}
private setSecondaryMenu(selectedNetwork: PrimaryMenuItem) {
diff --git a/projects/fusion-ui/components/navigation-menu/v4/navigation-pop-menu/navigation-pop-menu.component.html b/projects/fusion-ui/components/navigation-menu/v4/navigation-pop-menu/navigation-pop-menu.component.html
index 5eae9c474..802a490c3 100644
--- a/projects/fusion-ui/components/navigation-menu/v4/navigation-pop-menu/navigation-pop-menu.component.html
+++ b/projects/fusion-ui/components/navigation-menu/v4/navigation-pop-menu/navigation-pop-menu.component.html
@@ -6,8 +6,8 @@