From a112c6ed755159ca62875771d4f28bc2c5c47ad0 Mon Sep 17 00:00:00 2001 From: abbyhu2000 Date: Thu, 28 Sep 2023 05:26:08 +0000 Subject: [PATCH] fix removing pinned global filters Signed-off-by: abbyhu2000 --- .../application/utils/use/use_dashboard_app_state.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/dashboard/public/application/utils/use/use_dashboard_app_state.tsx b/src/plugins/dashboard/public/application/utils/use/use_dashboard_app_state.tsx index 84be8484023e..9efb4c4b2a13 100644 --- a/src/plugins/dashboard/public/application/utils/use/use_dashboard_app_state.tsx +++ b/src/plugins/dashboard/public/application/utils/use/use_dashboard_app_state.tsx @@ -193,6 +193,17 @@ export const useDashboardAppAndGlobalState = ({ subscriptions.add(stopSyncingFromTimeFilters); + const stopSyncingFromGlobalFilters = filterManager.getUpdates$().subscribe(() => { + refreshDashboardContainer({ + dashboardServices: services, + dashboardContainer, + savedDashboard: dashboard!, + appStateData: stateContainer.getState(), + }); + }); + + subscriptions.add(stopSyncingFromGlobalFilters); + unsubscribeFromDashboardContainer = () => { stopSyncingDashboardContainerInputs(); stopSyncingDashboardContainerOutputs();