From 891b2ca1a2af4af5d702e949f92cc93fb440ba1e Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Tue, 19 Feb 2019 09:43:35 +0100 Subject: [PATCH] fix: Have the tab param removed from the url when leaving edit mode #15485 --- public/app/features/dashboard/components/DashNav/DashNav.tsx | 2 +- public/app/features/dashboard/services/DashboardSrv.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/components/DashNav/DashNav.tsx b/public/app/features/dashboard/components/DashNav/DashNav.tsx index 8806e35c6b6..99ce3f904cd 100644 --- a/public/app/features/dashboard/components/DashNav/DashNav.tsx +++ b/public/app/features/dashboard/components/DashNav/DashNav.tsx @@ -65,7 +65,7 @@ export class DashNav extends PureComponent { }); } else { this.props.updateLocation({ - query: { panelId: null, edit: null, fullscreen: null }, + query: { panelId: null, edit: null, fullscreen: null, tab: null }, partial: true, }); } diff --git a/public/app/features/dashboard/services/DashboardSrv.ts b/public/app/features/dashboard/services/DashboardSrv.ts index e20c0ed5a31..c82aed13e44 100644 --- a/public/app/features/dashboard/services/DashboardSrv.ts +++ b/public/app/features/dashboard/services/DashboardSrv.ts @@ -43,6 +43,7 @@ export class DashboardSrv { delete urlParams.fullscreen; delete urlParams.edit; delete urlParams.panelId; + delete urlParams.tab; this.$location.search(urlParams); return; } @@ -58,6 +59,7 @@ export class DashboardSrv { urlParams.edit = true; } else { delete urlParams.edit; + delete urlParams.tab; } if (options.panelId || options.panelId === 0) {