From 022d707cb811c25188819f67814ef9fbf95f0a05 Mon Sep 17 00:00:00 2001 From: Jesse Hoobergs Date: Wed, 2 Mar 2022 21:59:33 +0100 Subject: [PATCH 1/2] Fix state of label selection on LabelingMenu for sequenceLabeling Currently labeling two enties with the same label by chosing it from the autocomplete, didn't work. Labeling the first entity worked, but when you tried to label a new entity with the same label chosen from the autocomplete, nothing happened. --- .../components/tasks/sequenceLabeling/LabelingMenu.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue b/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue index 64c7ad7d..4eed4869 100644 --- a/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue +++ b/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue @@ -16,7 +16,7 @@ { + this.value = undefined; if (this.$refs.autocomplete) { (this.$refs.autocomplete as any).selectedItems = [] } @@ -114,9 +116,10 @@ export default Vue.extend({ }, onLabelSelected(labelId: number) { + this.value= labelId; this.$emit('click:label', labelId) this.close() } } }) - \ No newline at end of file + From 56e681c32853aa46a6d85dba0809ae07dc2b2a47 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Thu, 3 Mar 2022 08:36:18 +0900 Subject: [PATCH 2/2] Fix LabelingMenu style --- frontend/components/tasks/sequenceLabeling/LabelingMenu.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue b/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue index 4eed4869..142130ed 100644 --- a/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue +++ b/frontend/components/tasks/sequenceLabeling/LabelingMenu.vue @@ -107,7 +107,7 @@ export default Vue.extend({ // Todo: a bit hacky. I want to fix this problem. // https://github.com/vuetifyjs/vuetify/issues/10765 this.$nextTick(() => { - this.value = undefined; + this.value = null if (this.$refs.autocomplete) { (this.$refs.autocomplete as any).selectedItems = [] } @@ -116,7 +116,7 @@ export default Vue.extend({ }, onLabelSelected(labelId: number) { - this.value= labelId; + this.value = labelId this.$emit('click:label', labelId) this.close() }