Skip to content

Commit d4b7c89

Browse files
authored
Merge pull request doccano#470 from chakki-works/bugfix/label-creation
Bugfix: create label over 26
2 parents 2ebc729 + ab27135 commit d4b7c89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/components/organisms/labels/LabelCreationForm.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
cancel-text="Cancel"
66
:disabled="!valid"
77
@agree="create"
8-
@cancel="cancel"
8+
@cancel="reset"
99
>
1010
<template #content>
1111
<v-form
@@ -87,20 +87,20 @@ export default {
8787
},
8888
reset() {
8989
this.$refs.form.reset()
90+
this.cancel('close')
9091
},
9192
create() {
9293
if (this.validate()) {
9394
this.createLabel({
9495
projectId: this.$route.params.id,
9596
text: this.labelName,
9697
prefix_key: null,
97-
suffix_key: this.suffixKey,
98-
background_color: this.color.slice(0, -2),
98+
suffix_key: this.suffixKey ? this.suffixKey : null,
99+
background_color: this.color.slice(0, 7), // #12345678 -> #123456
99100
text_color: '#ffffff'
100101
})
101102
.then(() => {
102103
this.reset()
103-
this.cancel()
104104
})
105105
.catch(() => {
106106
this.showError = true

0 commit comments

Comments
 (0)