We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c485893 commit d5eb45fCopy full SHA for d5eb45f
src/plugins/data/public/query/filter_manager/filter_manager.ts
@@ -76,10 +76,14 @@ export class FilterManager {
76
private handleStateUpdate(newFilters: Filter[]) {
77
// global filters should always be first
78
newFilters.sort(({ $state: a }: Filter, { $state: b }: Filter): number => {
79
- return a!.store === FilterStateStore.GLOBAL_STATE &&
80
- b!.store !== FilterStateStore.GLOBAL_STATE
81
- ? -1
82
- : 1;
+ if (a!.store === b!.store) {
+ return 0;
+ } else {
+ return a!.store === FilterStateStore.GLOBAL_STATE &&
83
+ b!.store !== FilterStateStore.GLOBAL_STATE
84
+ ? -1
85
+ : 1;
86
+ }
87
});
88
89
const filtersUpdated = !_.isEqual(this.filters, newFilters);
0 commit comments