From 51c802ea300962417d75c0b02b014f263c6604e7 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Fri, 10 Nov 2023 09:04:48 -0300 Subject: [PATCH] Fixes to loading order and loading state display in items list. --- src/views/admin/js/event-bus-search.js | 8 ++++---- .../faceted-search/theme-search/theme-items-page.vue | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/admin/js/event-bus-search.js b/src/views/admin/js/event-bus-search.js index 7543a0a1c..b0b374602 100644 --- a/src/views/admin/js/event-bus-search.js +++ b/src/views/admin/js/event-bus-search.js @@ -148,6 +148,10 @@ export default { } else { this.$store.dispatch('search/set_postquery', this.$route.query); } + + // Finally, loads items even berfore facets so they won't stuck them + if (to.fullPath != from.fullPath) + this.loadItems(); // Checks current metaqueries and taxqueries to alert filters that should reload // For some reason, this process is not working accessing to.query, so we need to check the path string. @@ -174,10 +178,6 @@ export default { ) { this.$emit('has-to-reload-facets', true); } - - // Finally, loads items - if (to.fullPath != from.fullPath) - this.loadItems(); } } }, diff --git a/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue b/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue index 54a5db8b9..24713bfc0 100644 --- a/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue +++ b/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/theme-items-page.vue @@ -542,13 +542,13 @@