From 1a87f8e5bf458053b349a04181fa313374856844 Mon Sep 17 00:00:00 2001 From: Matej Kubinec <32638572+matejkubinec@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:00:15 +0100 Subject: [PATCH] Navigation: Fix bookmarks when Grafana is running under subpath (#102679) * Navigation: Append subpath when searching for bookmarks menu item * Navigation: Find bookmark item by id --- public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx b/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx index 66d8ddaaac9..8d707e5fdeb 100644 --- a/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx +++ b/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx @@ -43,7 +43,7 @@ export const MegaMenu = memo( .map((item) => enrichWithInteractionTracking(item, state.megaMenuDocked)); if (config.featureToggles.pinNavItems) { - const bookmarksItem = findByUrl(navItems, '/bookmarks'); + const bookmarksItem = navItems.find((item) => item.id === 'bookmarks'); if (bookmarksItem) { // Add children to the bookmarks section bookmarksItem.children = pinnedItems.reduce((acc: NavModelItem[], url) => {