Skip to content

Commit

Permalink
fixes #69 - unable to draw multiple filters
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Oct 20, 2017
1 parent a0c16e8 commit 5fbd2c5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions public/vislib/geoFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ define(function (require) {
geoFilters.push({geo_shape: existingFilter.geo_shape});
type = 'geo_shape';
}
queryFilter.updateFilter({
model: {
bool : {
should : geoFilters
}

// Update method removed - so just remove old filter and add updated filter
const updatedFilter = {
bool: {
should: geoFilters
},
source: existingFilter,
type: type,
alias: filterAlias(field, geoFilters.length)
});
meta: existingFilter.meta
};
updatedFilter.meta.alias = filterAlias(field, geoFilters.length);
queryFilter.removeFilter(existingFilter);
queryFilter.addFilters([updatedFilter]);
} else {
let numFilters = 1;
if (_.isArray(newFilter)) {
Expand Down

0 comments on commit 5fbd2c5

Please sign in to comment.