Skip to content
Snippets Groups Projects

Resolve "Add refseq table results"

Merged Remi PLANEL requested to merge refseq-table-results into dev
9 files
+ 28035
85
Compare changes
  • Side-by-side
  • Inline
Files
9
<script setup lang="ts">
const props = defineProps<{
import { usePfamStore } from "@/stores/pfam";
export interface Props {
headers: Array<Object>;
systems: Array<Object>;
}>();
height: number;
}
const props = withDefaults(defineProps<Props>(), {
height: 800,
});
const itemsPerParge = ref(25);
const search = ref("");
const sortBy = ref([{ key: "system", order: "asc" }]);
const expanded = ref([]);
function filterOnlyCapsText(value, query, item) {
if (value != null && query != null) {
@@ -23,6 +32,9 @@ function filterOnlyCapsText(value, query, item) {
}
return false;
}
const { initPfam } = usePfamStore();
initPfam();
</script>
<template>
<v-card flat color="transparent" class="my-5">
@@ -42,7 +54,7 @@ function filterOnlyCapsText(value, query, item) {
></v-text-field>
</v-toolbar>
<v-data-table-virtual
height="800"
:height="height"
:items-per-page="itemsPerParge"
v-model:sort-by="sortBy"
:headers="props.headers"
@@ -50,6 +62,7 @@ function filterOnlyCapsText(value, query, item) {
:custom-filter="filterOnlyCapsText"
:items="props.systems"
:search="search"
item-value="system"
>
<template #[`item.system`]="{ item }">
<v-chip variant="text" link :to="`${item.columns.system.path}`">{{
@@ -66,6 +79,22 @@ function filterOnlyCapsText(value, query, item) {
:enumerate="false"
/>
</template>
<template #[`item.PFAM`]="{ item }">
<pfam-chips :pfam-string="item.columns.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>
</v-data-table-virtual>
</v-card>
</template>
\ No newline at end of file
Loading