Skip to content

Commit

Permalink
fix(searches): Disable results from previous releases when no data ar…
Browse files Browse the repository at this point in the history
…e available.
  • Loading branch information
aaronmussig committed Mar 26, 2023
1 parent 6d18ef3 commit 8347d6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/search/ResultsFromPreviousReleases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<template v-slot:activator="{ on, attrs }">
<v-btn
:disabled="loading"
:disabled="loading || !hasRows"
class="white--text overflow-hidden"
color="#7a8979"
depressed
Expand Down Expand Up @@ -86,7 +86,8 @@ export default Vue.extend({
],
rows: [] as TaxonPreviousReleases[],
dialog: false,
mdiHistorySvg: mdiHistory
mdiHistorySvg: mdiHistory,
hasRows: false,
}),
mounted() {
this.loadPreviousReleases(this.taxon);
Expand All @@ -103,6 +104,7 @@ export default Vue.extend({
this.$accessor.api.defaultCatch(err);
})
.finally(() => {
this.hasRows = this.rows.length > 0;
this.loading = false;
});
}
Expand Down

0 comments on commit 8347d6e

Please sign in to comment.