Skip to content

Commit add386f

Browse files
authored
fix(TagsInput): empty string with delimiter (#2136)
- string replacement with delimiter - telemeter input only - spaces + delimiter
1 parent 3c38afb commit add386f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/core/src/TagsInput/TagsInputInput.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ function handleInput(event: InputEvent) {
8686
const target = event.target as HTMLInputElement
8787
target.value = target.value.replace(delimiter, '')
8888
89+
if (target.value.trim() === '') {
90+
target.value = ''
91+
return
92+
}
93+
8994
const isAdded = context.onAddValue(target.value)
9095
if (isAdded)
9196
target.value = ''

0 commit comments

Comments
 (0)