From c4242b8c5e946fffef1fcd92d6765ca6d37eb715 Mon Sep 17 00:00:00 2001 From: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com> Date: Tue, 23 May 2023 17:11:48 +0200 Subject: [PATCH] DashboardPage: Update pageNav url when folders differ (#68838) Check if folder is different and update URL --- public/app/features/dashboard/containers/DashboardPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 7a06821851a..e9c5a1fa95a 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -426,7 +426,7 @@ function updateStatePageNavFromProps(props: Props, state: State): State { let pageNav = state.pageNav; let sectionNav = state.sectionNav; - if (!pageNav || dashboard.title !== pageNav.text) { + if (!pageNav || dashboard.title !== pageNav.text || dashboard.meta.folderUrl !== pageNav.parentItem?.url) { pageNav = { text: dashboard.title, url: locationUtil.getUrlForPartial(props.history.location, {