Skip to content

Commit c09216b

Browse files
[Maps] fix application state filters transfer from other kibana application to maps application (#73516)
* [Maps] fix application state filters transfer from other kibana application to maps application * clean up comment Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 550d44e commit c09216b

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

x-pack/plugins/maps/public/routing/routes/maps_app/maps_app_view.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,6 @@ export class MapsAppView extends React.Component {
9191
this._globalSyncChangeMonitorSubscription.unsubscribe();
9292
}
9393

94-
// Clean up app state filters
95-
const { filterManager } = getData().query;
96-
filterManager.filters.forEach((filter) => {
97-
if (filter.$state.store === esFilters.FilterStateStore.APP_STATE) {
98-
filterManager.removeFilter(filter);
99-
}
100-
});
101-
10294
getCoreChrome().setBreadcrumbs([]);
10395
}
10496

x-pack/plugins/maps/public/routing/state_syncing/app_sync.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export function startAppStateSyncing(appStateManager) {
1515
// sync app filters with app state container from data.query to state container
1616
const { query } = getData();
1717

18+
// Filter manager state persists across applications
19+
// clear app state filters to prevent application filters from other applications being transfered to maps
20+
query.filterManager.setAppFilters([]);
21+
1822
const stateContainer = {
1923
get: () => ({
2024
query: appStateManager.getQuery(),

0 commit comments

Comments
 (0)