From a1f52ea9bf820561706bf8fa27c739fb31e7cb99 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 29 Jun 2020 10:04:18 -0300 Subject: [PATCH] Forces setting isLoadingOptions to false when using elastic search. --- .../admin/components/filter-types/taxonomy/Checkbox.vue | 3 +++ src/views/admin/js/filter-types-mixin.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/views/admin/components/filter-types/taxonomy/Checkbox.vue b/src/views/admin/components/filter-types/taxonomy/Checkbox.vue index d34cac929..09b328288 100644 --- a/src/views/admin/components/filter-types/taxonomy/Checkbox.vue +++ b/src/views/admin/components/filter-types/taxonomy/Checkbox.vue @@ -184,6 +184,9 @@ this.prepareOptionsForTaxonomy(this.facetsFromItemSearch[facet]); else this.prepareOptionsForTaxonomy(Object.values(this.facetsFromItemSearch[facet])); + + if (this.isUsingElasticSearch) + this.isLoadingOptions = false; } } } diff --git a/src/views/admin/js/filter-types-mixin.js b/src/views/admin/js/filter-types-mixin.js index 8deb893b9..74c315ef0 100644 --- a/src/views/admin/js/filter-types-mixin.js +++ b/src/views/admin/js/filter-types-mixin.js @@ -133,6 +133,9 @@ export const dynamicFilterTypeMixin = { for (const facet in this.facetsFromItemSearch) { if (facet == this.filter.id) { this.prepareOptionsForPlainText(this.facetsFromItemSearch[facet], search, valuesToIgnore, isInCheckboxModal); + + if (this.isUsingElasticSearch) + this.isLoadingOptions = false; } } resolve(); @@ -210,6 +213,9 @@ export const dynamicFilterTypeMixin = { for (const facet in this.facetsFromItemSearch) { if (facet == this.filter.id) { this.prepareOptionsForRelationship(this.facetsFromItemSearch[facet], search, valuesToIgnore, isInCheckboxModal); + + if (this.isUsingElasticSearch) + this.isLoadingOptions = false; } } resolve();