Prevents placeholder of no item found to appear on repository items list right before loading finishes.
This commit is contained in:
parent
9b0d22e2a3
commit
fbfc090f89
|
@ -506,7 +506,7 @@
|
|||
<button
|
||||
class="button is-white"
|
||||
:aria-label="$i18n.get('label_urls')"
|
||||
:disabled="this.totalItems == undefined || this.totalItems <= 0"
|
||||
:disabled="totalItems == undefined || totalItems <= 0"
|
||||
@click="openExposersModal()">
|
||||
<span class="gray-icon">
|
||||
<i class="tainacan-icon tainacan-icon-20px tainacan-icon-url"/>
|
||||
|
@ -700,7 +700,7 @@
|
|||
|
||||
<!-- Empty Placeholder (only used in Admin) -->
|
||||
<section
|
||||
v-if="!isOnTheme && !isLoadingItems && totalItems <= 0"
|
||||
v-if="!isOnTheme && !isLoadingItems && totalItems == 0"
|
||||
class="section">
|
||||
<div class="content has-text-grey has-text-centered">
|
||||
<p>
|
||||
|
@ -1396,7 +1396,7 @@
|
|||
});
|
||||
|
||||
this.$eventBusSearch.$on('hasToPrepareMetadataAndFilters', (to) => {
|
||||
/* This condition is to prevent a incorrect fetch by filter or metadata when we coming from items
|
||||
/* This condition is to prevent an incorrect fetch by filter or metadata when we coming from items
|
||||
* at collection level to items page at repository level
|
||||
*/
|
||||
|
||||
|
@ -1416,7 +1416,7 @@
|
|||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
this.prepareFilters();
|
||||
this.prepareMetadata();
|
||||
this.localDisplayedMetadata = JSON.parse(JSON.stringify(this.displayedMetadata));
|
||||
|
|
|
@ -492,7 +492,7 @@
|
|||
<button
|
||||
class="button is-white"
|
||||
:aria-label="$i18n.get('label_urls')"
|
||||
:disabled="this.totalItems == undefined || this.totalItems <= 0"
|
||||
:disabled="totalItems == undefined || totalItems <= 0"
|
||||
@click="openExposersModal()">
|
||||
<span class="gray-icon">
|
||||
<i class="tainacan-icon tainacan-icon-20px tainacan-icon-url"/>
|
||||
|
@ -679,7 +679,7 @@
|
|||
|
||||
<!-- Empty Placeholder (only used in Admin) -->
|
||||
<section
|
||||
v-if="!isOnTheme && !isLoadingItems && totalItems <= 0"
|
||||
v-if="!isOnTheme && !isLoadingItems && totalItems == 0"
|
||||
class="section">
|
||||
<div class="content has-text-grey has-text-centered">
|
||||
<p>
|
||||
|
@ -1356,7 +1356,7 @@
|
|||
});
|
||||
|
||||
this.$eventBusSearch.$on('hasToPrepareMetadataAndFilters', (to) => {
|
||||
/* This condition is to prevent a incorrect fetch by filter or metadata when we come from items
|
||||
/* This condition is to prevent an incorrect fetch by filter or metadata when we come from items
|
||||
* at collection level to items page at repository level
|
||||
*/
|
||||
|
||||
|
|
|
@ -272,6 +272,9 @@ export default {
|
|||
this.$store.dispatch('search/setStatus', status);
|
||||
this.updateURLQueries();
|
||||
},
|
||||
setTotalItems(totalItems) {
|
||||
this.$store.dispatch('search/setTotalItems', totalItems);
|
||||
},
|
||||
setSearchQuery(searchQuery) {
|
||||
this.$store.dispatch('search/setSearchQuery', searchQuery);
|
||||
this.updateURLQueries();
|
||||
|
@ -351,6 +354,7 @@ export default {
|
|||
|
||||
},
|
||||
setCollectionId(collectionId) {
|
||||
this.setTotalItems(null);
|
||||
this.collectionId = collectionId;
|
||||
},
|
||||
setTerm(termId, taxonomy) {
|
||||
|
|
Loading…
Reference in New Issue