Skip to content

Commit

Permalink
fix: don't display nothing-found palceholder while query is pending
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Mar 24, 2024
1 parent 59ecb26 commit 6d74706
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/data-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const entities = computed(() => {
class="relative isolate grid size-full overflow-y-auto"
:class="{ 'opacity-50 grayscale': isLoading }"
>
<div v-if="useGetSearchResults.length > 0" class="grid gap-8">
<div v-if="entities.length > 0" class="grid gap-8">
<SearchResultsTable
:entities="entities"
:sorting="sortingState"
Expand Down Expand Up @@ -146,7 +146,7 @@ const entities = computed(() => {
</Pagination>
</div>
<div v-else>
<div v-else-if="!isLoading">
<Centered>{{ t("DataView.nothing-found") }}</Centered>
</div>
Expand Down
4 changes: 3 additions & 1 deletion messages/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
"end-date": "End-Datum",
"start-date": "Start-Datum"
},
"DataView": {
"nothing-found": "Keine Einträge zu dieser Suche."
},
"DataPage": {
"meta": {
"title": "Daten"
},
"nothing-found": "Nichts gefunden",
"search": "Suche",
"title": "Daten",
"work-in-progress": "Die Datenbank ist derzeit im Aufbau."
Expand Down
4 changes: 3 additions & 1 deletion messages/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
"end-date": "End date",
"start-date": "Start date"
},
"DataView": {
"nothing-found": "No entries found for this search."
},
"DataPage": {
"meta": {
"title": "Data"
},
"nothing-found": "Nothing found",
"search": "Search",
"title": "Data",
"work-in-progress": "The database is currently work in progress."
Expand Down

0 comments on commit 6d74706

Please sign in to comment.