Skip to content

Commit e4203c5

Browse files
committed
highlighting genes based on table row
1 parent 75a9257 commit e4203c5

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/portals/SysBio/components/BulkTable.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
:sort-by.sync="sortField"
4343
:sort-desc.sync="sortDesc"
4444
>
45+
<template #cell(gene)="r">
46+
<button @click="findGene(r.item.gene)">{{ r.item.gene }}</button>
47+
</template>
4548
</b-table>
4649
<b-pagination
4750
v-model="currentPage"
@@ -281,10 +284,12 @@ export default Vue.component("bulk-table", {
281284
return "";
282285
},
283286
findGene(gene){
284-
// Populate the subtable before toggling it open
285287
if (gene === ""){
286288
return;
287289
}
290+
if (this.highlightedGene !== gene){
291+
this.$emit("highlightRow", gene);
292+
}
288293
this.$emit("geneFound", false);
289294
let sortedItems = this.bulkData.toSorted(
290295
(a,b) => this.sortDesc

src/portals/SysBio/views/BulkBrowser/Template.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
<bulk-table
136136
:bulkData="$parent.bulkData19K"
137137
@geneFound="v => $parent.geneFound(v)"
138+
@highlightRow="gene => $parent.highlight(gene)"
138139
:dataset="$store.state.selectedDataset"
139140
:config="$parent.tableConfig"
140141
:scatterConfig="$parent.scatterplotConfig"

0 commit comments

Comments
 (0)