From ab925eb57c997d0d1d5f578f319549f986caeee0 Mon Sep 17 00:00:00 2001 From: "Qingyang(Abby) Hu" Date: Tue, 3 Oct 2023 09:56:32 -0700 Subject: [PATCH] fix removing pinned global filters (#5143) Signed-off-by: abbyhu2000 Co-authored-by: Miki Co-authored-by: Josh Romero --- .../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();