Skip to content

Commit

Permalink
Merge pull request #62 from istresearch/P4-1857-2
Browse files Browse the repository at this point in the history
P4 1857 - Fixed Filter Issue for Visualization Multiple Filter Select
  • Loading branch information
andrewkcarter committed Aug 14, 2020
2 parents 1d7bc1d + 6c3e602 commit 927644e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/hacks/custom_filter_bootstrap/index.js
Expand Up @@ -53,11 +53,11 @@ app.run([
const filterManagerHelper = new FilterManagerHelper(addFiltersCached);

filterManager.addFilters = (newFilters) => {
if (_.isArray(newFilters) && newFilters.length !== 1) {
addFiltersCached.apply(filterManager, newFilters);
} else {
const newFilter = newFilters[0];
if (_.isArray(newFilters) && newFilters.length === 0) {
return;
}

for (let newFilter of newFilters) {
const selectedIndexPatternID = _.get(newFilter, 'meta.index', null);
const fieldFormatMap = indexPatternLookup[selectedIndexPatternID];
const matchPhrase = _.get(newFilter, 'query.match_phrase', {});
Expand Down Expand Up @@ -101,7 +101,7 @@ app.run([
}

if (!customFilterFlag) {
addFiltersCached.apply(filterManager, newFilters);
addFiltersCached.apply(filterManager, [newFilter]);
}
}
};
Expand Down

0 comments on commit 927644e

Please sign in to comment.