Browse Source
Merge pull request #1712 from jhoobergs/master
Fix state of label selection on LabelingMenu for sequenceLabeling
pull/1713/head
Hiroki Nakayama
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
2 deletions
-
frontend/components/tasks/sequenceLabeling/LabelingMenu.vue
|
|
@ -16,7 +16,7 @@ |
|
|
|
<v-list-item> |
|
|
|
<v-autocomplete |
|
|
|
ref="autocomplete" |
|
|
|
:value="selectedLabel" |
|
|
|
v-model="value" |
|
|
|
:items="labels" |
|
|
|
autofocus |
|
|
|
dense |
|
|
@ -92,6 +92,7 @@ export default Vue.extend({ |
|
|
|
entity: null as any, |
|
|
|
fromEntity: null as any, |
|
|
|
toEntity: null as any, |
|
|
|
value: this.selectedLabel |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -106,6 +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 = null |
|
|
|
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() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |