Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Avoid showing the reference list if no results were found #4036

Merged
merged 1 commit into from
May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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