Skip to content

Commit

Permalink
[Maps] fix bug with draw filters in maps application (#42956) (#42968)
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese authored Aug 8, 2019
1 parent e282f70 commit 3b4c17d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x-pack/legacy/plugins/maps/public/angular/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {
MAP_SAVED_OBJECT_TYPE,
MAP_APP_PATH
} from '../../common/constants';

import { FilterStateStore } from '@kbn/es-query';
import { setup as data } from '../../../../../../src/legacy/core_plugins/data/public/legacy';

const REACT_ANCHOR_DOM_ELEMENT_ID = 'react-maps-root';
Expand Down Expand Up @@ -170,6 +170,9 @@ app.controller('GisMapController', ($scope, $route, kbnUrl, localStorage, AppSta
};

function addFilters(newFilters) {
newFilters.forEach(filter => {
filter.$state = FilterStateStore.APP_STATE;
});
$scope.updateFiltersAndDispatch([...$scope.filters, ...newFilters]);
}

Expand Down

0 comments on commit 3b4c17d

Please sign in to comment.