From 15e143b09ad67d4e59891ff702327b9ceaefe78e Mon Sep 17 00:00:00 2001 From: Mateus Machado Luna Date: Mon, 23 Sep 2019 14:08:57 -0300 Subject: [PATCH] Removes unecessary request to repository filters on filters list. Hides loading container on facets block when number of facets is empty. --- src/admin/components/lists/filters-list.vue | 6 ------ .../tainacan-facets/facets-list/facets-list-theme.vue | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/admin/components/lists/filters-list.vue b/src/admin/components/lists/filters-list.vue index da180a040..d0e886be8 100644 --- a/src/admin/components/lists/filters-list.vue +++ b/src/admin/components/lists/filters-list.vue @@ -684,12 +684,6 @@ export default { }) .catch(() => this.isLoadingFilters = false); - // On repository level we also fetch collection filters - if (this.isRepositoryLevel) { - this.fetchRepositoryCollectionFilters() - .catch(() => this.isLoadingFilters = false); - } - // Obtains collection name if (!this.isRepositoryLevel) { diff --git a/src/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue b/src/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue index d25d45220..9ea3dc21a 100644 --- a/src/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue +++ b/src/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue @@ -123,8 +123,9 @@
- {{ facets.length > 0 ? '' : $root.__('Nothing found.', 'tainacan') }} + class="spinner-container" + :style="{ display: facets.length > 0 ? 'none' : 'flex'}"> + {{ $root.__('Nothing found.', 'tainacan') }}