mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
parent
ed63c1c24f
commit
a181529630
1 changed files with 9 additions and 2 deletions
|
@ -279,10 +279,17 @@ export class VegaBaseView {
|
|||
*/
|
||||
async removeFilterHandler(query, index) {
|
||||
const indexId = await this._findIndex(index);
|
||||
const filter = esFilters.buildQueryFilter(query, indexId);
|
||||
const filterToRemove = esFilters.buildQueryFilter(query, indexId);
|
||||
|
||||
const currentFilters = this._filterManager.getFilters();
|
||||
const existingFilter = currentFilters.find(filter =>
|
||||
esFilters.compareFilters(filter, filterToRemove)
|
||||
);
|
||||
|
||||
if (!existingFilter) return;
|
||||
|
||||
try {
|
||||
this._filterManager.removeFilter(filter);
|
||||
this._filterManager.removeFilter(existingFilter);
|
||||
} catch (err) {
|
||||
this.onError(err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue