Skip to content

Commit

Permalink
Merge pull request #4036 from nextcloud/bugfix/reference-list-no-result
Browse files Browse the repository at this point in the history
fix: Avoid showing the reference list if no results were found
  • Loading branch information
nickvergessen authored May 4, 2023
2 parents cc3af74 + 6adabf2 commit a72342c
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 a72342c

Please sign in to comment.