Emits event do inform document that a list has just changed its loading state.

This commit is contained in:
mateuswetah 2021-10-29 10:27:49 -03:00
parent e9e56489e2
commit 6d2d8a1cf9
1 changed files with 10 additions and 0 deletions

View File

@ -723,7 +723,17 @@
this.$eventBusSearch.updateStoreFromURL();
this.$eventBusSearch.$on('isLoadingItems', isLoadingItems => {
this.isLoadingItems = isLoadingItems;
document.dispatchEvent(new CustomEvent('tainacan-items-list-is-loading-items', {
detail: {
isLoading: this.isLoadingItems,
collectionId: this.collectionId,
termId: this.termId,
taxonomy: this.taxonomy
}
}));
});
this.$eventBusSearch.$on('hasFiltered', hasFiltered => {