Skip to content

Commit 4e6417c

Browse files
committed
fixed tag-input
1 parent a7cdf49 commit 4e6417c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/tag-input.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ export default class TagInput extends LitElement {
3737
if (e.target.value) {
3838
if (Array.isArray(this.value)) {
3939
this.value = [...this.value, e.target.value];
40-
e.target.value = '';
40+
} else {
41+
this.value = [e.target.value];
4142
}
43+
e.target.value = '';
4244
}
4345
} else if (e.keyCode === 8) {
4446
if (Array.isArray(this.value) && this.value.length > 0) {

0 commit comments

Comments
 (0)