Fixes to loading order and loading state display in items list.

This commit is contained in:
mateuswetah 2023-11-10 09:04:48 -03:00
parent 20eaf4e8f4
commit 51c802ea30
2 changed files with 6 additions and 6 deletions

View File

@ -149,6 +149,10 @@ export default {
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.
const oldQueryString = from.fullPath.replace(from.path + '?', '');
@ -174,10 +178,6 @@ export default {
) {
this.$emit('has-to-reload-facets', true);
}
// Finally, loads items
if (to.fullPath != from.fullPath)
this.loadItems();
}
}
},

View File

@ -542,13 +542,13 @@
<!-- Default loading, to be used view modes without any skeleton-->
<b-loading
v-if="!(registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].skeleton_template != undefined)"
v-if="registeredViewModes[viewMode] != undefined && !registeredViewModes[viewMode].implements_skeleton && !registeredViewModes[viewMode].skeleton_template"
:is-full-page="false"
:active.sync="showLoading"/>
<!-- Custom skeleton templates used by some view modes -->
<div
v-if="(registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].skeleton_template != undefined)"
v-if="registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].implements_skeleton && registeredViewModes[viewMode].skeleton_template"
v-html="registeredViewModes[viewMode].skeleton_template"/>
</div>