Skip to content

Commit

Permalink
tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Feb 16, 2023
1 parent 1be70cc commit 0a51080
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/kbn-es-query/src/filters/helpers/only_disabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import { filter } from 'lodash';
import type { Filter } from '..';
import type { FilterCompareOptions } from './compare_filters';
import { compareFilters, COMPARE_ALL_OPTIONS } from './compare_filters';

const isEnabled = (f: Filter) => f && f.meta && !f.meta.disabled;
Expand All @@ -21,11 +22,12 @@ const isEnabled = (f: Filter) => f && f.meta && !f.meta.disabled;
export const onlyDisabledFiltersChanged = (
newFilters?: Filter[],
oldFilters?: Filter[],
comparatorOptions?: FilterCompareOptions = COMPARE_ALL_OPTIONS
comparatorOptions?: FilterCompareOptions
) => {
// If it's the same - compare only enabled filters
const newEnabledFilters = filter(newFilters || [], isEnabled);
const oldEnabledFilters = filter(oldFilters || [], isEnabled);
const options = comparatorOptions ?? COMPARE_ALL_OPTIONS;

return compareFilters(oldEnabledFilters, newEnabledFilters, comparatorOptions);
return compareFilters(oldEnabledFilters, newEnabledFilters, options);
};

0 comments on commit 0a51080

Please sign in to comment.