Skip to content

Commit

Permalink
fix: Avoid showing the reference list if no results were found
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed May 4, 2023
1 parent ca8f082 commit 6adabf2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/NcRichText/NcReferenceList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="widgets--list" :class="{'icon-loading': loading }">
<div v-for="reference in displayedReferences" :key="reference.openGraphObject.id">
<div v-if="isVisible" class="widgets--list" :class="{'icon-loading': loading }">
<div v-for="reference in displayedReferences" :key="reference?.openGraphObject?.id">
<NcReferenceWidget :reference="reference" />
</div>
</div>
Expand Down Expand Up @@ -38,6 +38,9 @@ export default {
}
},
computed: {
isVisible() {
return this.loading || this.referenceData
},
values() {
return this.referenceData
? this.referenceData
Expand Down

0 comments on commit 6adabf2

Please sign in to comment.