From da975ad3e562e47da739d0469e5fb74cdc935221 Mon Sep 17 00:00:00 2001 From: Dhiraj Kumar Date: Wed, 13 Sep 2023 20:31:24 +0530 Subject: [PATCH] Don't show context on no comp/dim comp --- web-common/src/features/dashboards/dashboard-stores.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web-common/src/features/dashboards/dashboard-stores.ts b/web-common/src/features/dashboards/dashboard-stores.ts index 031c8b394ab..efc43b66d70 100644 --- a/web-common/src/features/dashboards/dashboard-stores.ts +++ b/web-common/src/features/dashboards/dashboard-stores.ts @@ -420,9 +420,9 @@ const metricViewReducers = { setComparisonDimension(name: string, dimensionName: string) { updateMetricsExplorerByName(name, (metricsExplorer) => { if (dimensionName === undefined) { - metricsExplorer.showTimeComparison = true; + setDisplayComparison(metricsExplorer, true); } else { - metricsExplorer.showTimeComparison = false; + setDisplayComparison(metricsExplorer, false); } metricsExplorer.selectedComparisonDimension = dimensionName; }); @@ -430,8 +430,8 @@ const metricViewReducers = { disableAllComparisons(name: string) { updateMetricsExplorerByName(name, (metricsExplorer) => { - metricsExplorer.showTimeComparison = false; metricsExplorer.selectedComparisonDimension = undefined; + setDisplayComparison(metricsExplorer, false); }); },