Skip to content

Commit

Permalink
Merge pull request #218 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Add no records found message in PanelDescendants
  • Loading branch information
jlpereira authored Jul 24, 2024
2 parents 33f287d + 21f7586 commit 509b631
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@
<ul class="tree ml-2">
<AnimationOpacity>
<DescendantsTree
v-if="
taxonomy &&
(taxonomy.nomenclatural_synonyms.length ||
taxonomy.descendants.length)
"
v-if="hasRecords"
:taxonomy="taxonomy"
/>
</AnimationOpacity>
</ul>
<span v-if="!hasRecords && !isLoading">No records found.</span>
</VCardContent>
</VCard>
</template>

<script setup>
import { ref, watch } from 'vue'
import { computed, ref, watch } from 'vue'
import { useOtuPageRequest } from '@/modules/otus/helpers/useOtuPageRequest'
import DescendantsTree from './DescendantsTree.vue'
import TaxonWorks from '../../../services/TaxonWorks'
Expand All @@ -45,6 +42,13 @@ const props = defineProps({
const taxonomy = ref(null)
const isLoading = ref(false)
const hasRecords = computed(
() =>
taxonomy.value &&
(taxonomy.value.nomenclatural_synonyms.length ||
taxonomy.value.descendants.length)
)
watch(
() => props.otuId,
async () => {
Expand Down

0 comments on commit 509b631

Please sign in to comment.