From 028d720e79d9047f62a0aae0832c86d44b3e99e0 Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Wed, 29 Jan 2025 15:36:44 -0500 Subject: [PATCH] Do not set selectedSuperpixel until list is ready --- .../ActiveLearningReview/ActiveLearningReviewContainer.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wsi_superpixel_guided_labeling/web_client/views/vue/components/ActiveLearningReview/ActiveLearningReviewContainer.vue b/wsi_superpixel_guided_labeling/web_client/views/vue/components/ActiveLearningReview/ActiveLearningReviewContainer.vue index 9a61e0d..276e7d6 100644 --- a/wsi_superpixel_guided_labeling/web_client/views/vue/components/ActiveLearningReview/ActiveLearningReviewContainer.vue +++ b/wsi_superpixel_guided_labeling/web_client/views/vue/components/ActiveLearningReview/ActiveLearningReviewContainer.vue @@ -266,7 +266,6 @@ export default Vue.extend({ menuObserver.observe(element); }); - this.selectedSuperpixel = this.filteredSortedGroupedSuperpixels.data[0]; this.$nextTick(() => { const resizeHandle = document.querySelector('.resize-handle'); resizeHandle.removeEventListener('mousedown', () => { this.isResizing = true; }); @@ -633,6 +632,9 @@ export default Vue.extend({ data = this.groupSuperpixels(data); this.filteredSortedGroupedSuperpixels = _.mapObject( data, (value) => this.sortSuperpixels(value)); + if (!this.selectedSuperpixel) { + this.selectedSuperpixel = this.filteredSortedGroupedSuperpixels.data[0]; + } this.$nextTick(() => this.hideProgressBar()); }, 0); },