Skip to content
Snippets Groups Projects
Commit 8734a438 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Fix api change in datatable item slot

parent 282dd2f0
No related branches found
No related tags found
1 merge request!15Resolve "Download button for structure"
...@@ -26,53 +26,42 @@ function constructPfamUrl(pfam: string) { ...@@ -26,53 +26,42 @@ function constructPfamUrl(pfam: string) {
} }
</script> </script>
<template> <template>
<v-card flat class="d-flex justify-start align-center"> <!-- class="d-inline-flex justify-start align-center" -->
<template v-for="(pfam, index) in pfams" :key="pfam"> <v-row>
<v-chip <v-col>
v-if="index < itemsToDisplay || itemsToDisplay < 0" <v-card flat color="transparent" density="compact" rounded="false">
:href="constructPfamUrl(pfam)" <template v-for="(pfam, index) in pfams" :key="pfam">
target="_blank" <v-chip v-if="index < itemsToDisplay || itemsToDisplay < 0" :href="constructPfamUrl(pfam)" target="_blank"
color="info" color="info" class="mr-1 mb-1">
class="mr-1" {{ pfam }}
> <v-tooltip activator="parent" location="top">{{
{{ pfam }} pfamStore.get(pfam)?.DE ?? "none"
<v-tooltip activator="parent" location="top">{{ }}</v-tooltip></v-chip>
pfamStore.get(pfam)?.DE ?? "none"
}}</v-tooltip></v-chip
>
<template v-if="index === itemsToDisplay"> <template v-if="index === itemsToDisplay">
<v-chip <span>
v-if="!show" <v-chip v-if="!show" variant="text" class="text-grey text-caption align-self-center px-1 "
variant="text" @click="show = !show">
class="text-grey text-caption align-self-center px-1" (+{{ pfams.length - itemsToDisplay }} others)
@click="show = !show" </v-chip>
> <v-btn v-if="itemsToDisplay < pfams.length && !show" variant="text" :icon="'mdi-chevron-down'"
(+{{ pfams.length - itemsToDisplay }} others) @click="show = !show"></v-btn>
</v-chip> </span>
</template> </template>
</template> </template>
<template v-if="pfams.length > itemsToDisplay && show"> <template v-if="pfams.length > itemsToDisplay && show">
<template v-for="(pfam, index) in pfams" :key="pfam"> <template v-for="(pfam, index) in pfams" :key="pfam">
<v-chip <v-chip v-if="index >= itemsToDisplay" :href="constructPfamUrl(pfam)" target="_blank" color="info"
v-if="index >= itemsToDisplay" class="mr-1 mb-1">
:href="constructPfamUrl(pfam)" {{ pfam }}
target="_blank" <v-tooltip activator="parent" location="top">{{
color="info" pfamStore.get(pfam)?.DE ?? "none"
class="mr-1" }}</v-tooltip></v-chip>
> </template>
{{ pfam }} </template>
<v-tooltip activator="parent" location="top">{{ <v-btn v-if="itemsToDisplay < pfams.length && show" variant="text" :icon="'mdi-chevron-up'"
pfamStore.get(pfam)?.DE ?? "none" @click="show = !show"></v-btn>
}}</v-tooltip></v-chip </v-card>
> </v-col>
</template> </v-row>
</template>
<v-btn
v-if="itemsToDisplay < pfams.length"
variant="text"
:icon="show ? 'mdi-chevron-up' : 'mdi-chevron-down'"
@click="show = !show"
></v-btn>
</v-card>
</template> </template>
\ No newline at end of file
...@@ -37,7 +37,7 @@ const { initPfam } = usePfamStore(); ...@@ -37,7 +37,7 @@ const { initPfam } = usePfamStore();
initPfam(); initPfam();
</script> </script>
<template> <template>
<v-card> <v-card >
<v-toolbar density="compact"> <v-toolbar density="compact">
<v-toolbar-title>Defense Systems</v-toolbar-title> <v-toolbar-title>Defense Systems</v-toolbar-title>
...@@ -58,14 +58,7 @@ initPfam(); ...@@ -58,14 +58,7 @@ initPfam();
</template> </template>
<template #[`item.PFAM`]="{ item }"> <template #[`item.PFAM`]="{ item }">
<pfam-chips v-if="item.columns?.PFAM" :pfam-string="item.columns.PFAM"></pfam-chips> <pfam-chips v-if="item?.PFAM" :pfam-string="item.PFAM"></pfam-chips>
</template>
<template #expanded-row="{ columns, item }">
<tr>
<td :colspan="columns.length" class="v-data-table__td v-data-table-column--align-start">
<pfam-chips :pfam-string="item.columns.PFAM" :items-to-display="-1"></pfam-chips>
</td>
</tr>
</template> </template>
</v-data-table-virtual> </v-data-table-virtual>
</v-card> </v-card>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment