Better way of handling loading state to filters.
This commit is contained in:
parent
76a2b65473
commit
4f2ec6f4e9
|
@ -184,9 +184,6 @@
|
|||
this.prepareOptionsForTaxonomy(this.facetsFromItemSearch[facet]);
|
||||
else
|
||||
this.prepareOptionsForTaxonomy(Object.values(this.facetsFromItemSearch[facet]));
|
||||
|
||||
if (this.isUsingElasticSearch)
|
||||
this.isLoadingOptions = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -287,11 +287,11 @@
|
|||
props: {
|
||||
collectionId: String,
|
||||
isRepositoryLevel: Boolean,
|
||||
taxonomy: String
|
||||
taxonomy: String,
|
||||
isLoadingItems: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoadingItems: true,
|
||||
isLoadingFilters: false,
|
||||
collapseAll: false,
|
||||
taxonomyFiltersCollectionNames: {},
|
||||
|
@ -375,11 +375,6 @@
|
|||
*/
|
||||
this.prepareFilters();
|
||||
});
|
||||
if (this.isUsingElasticSearch) {
|
||||
this.$eventBusSearch.$on('isLoadingItems', isLoadingItems => {
|
||||
this.isLoadingItems = isLoadingItems;
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
// Cancels previous collection name Request
|
||||
|
@ -395,9 +390,6 @@
|
|||
this.filtersSearchCancel.cancel('Filters search Canceled.');
|
||||
|
||||
this.$eventBusSearch.$off('hasToPrepareMetadataAndFilters');
|
||||
|
||||
if (this.isUsingElasticSearch)
|
||||
this.$eventBusSearch.$off('isLoadingItems');
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -133,9 +133,6 @@ 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();
|
||||
|
@ -213,9 +210,6 @@ 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();
|
||||
|
|
|
@ -429,6 +429,7 @@
|
|||
aria-role="dialog"
|
||||
custom-class="tainacan-form filters-menu">
|
||||
<filters-items-list
|
||||
:is-loading-items="isLoadingItems"
|
||||
autofocus="true"
|
||||
tabindex="-1"
|
||||
aria-modal
|
||||
|
|
|
@ -408,6 +408,7 @@
|
|||
:custom-class="'tainacan-form filters-menu' + (filtersAsModal ? ' filters-menu-modal' : '')"
|
||||
:can-cancel="hideHideFiltersButton ? ['x', 'outside'] : ['x', 'escape', 'outside']">
|
||||
<filters-items-list
|
||||
:is-loading-items="isLoadingItems"
|
||||
:autofocus="filtersAsModal"
|
||||
:tabindex="filtersAsModal ? -1 : 0"
|
||||
:aria-modal="filtersAsModal"
|
||||
|
|
Loading…
Reference in New Issue