Skip to content

Commit bbe63be

Browse files
committed
feat: auto-run enrichment analysis when tab becomes active
1 parent 4a81559 commit bbe63be

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎frontend/src/components/results/EnrichmentTab.vue‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
</template>
115115

116116
<script setup>
117-
import { ref, computed, nextTick } from 'vue'
117+
import { ref, computed, nextTick, watch } from 'vue'
118118
import { useI18n } from 'vue-i18n'
119119
import axios from 'axios'
120120
import { useChartTheme } from '../../composables/useChartTheme'
@@ -154,6 +154,13 @@ const significantCount = computed(() => {
154154
return enrichmentData.value.results.filter(r => r.significant).length
155155
})
156156
157+
// Auto-run enrichment when tab becomes active
158+
watch(() => props.active, (isActive) => {
159+
if (isActive && !enrichmentData.value && !loading.value && props.jobId) {
160+
runEnrichment()
161+
}
162+
})
163+
157164
async function runEnrichment() {
158165
loading.value = true
159166
try {

0 commit comments

Comments
 (0)