[Maps] fix bug with draw filters in maps application (#42956) (#42968)

This commit is contained in:
Nathan Reese 2019-08-08 13:11:40 -06:00 committed by GitHub
parent e282f7026a
commit 3b4c17d19e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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';
@ -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]);
}