Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6e346b

Browse files
fix(ComboboxCancel): reset model value on clear without requiring input element (#2332)
1 parent 375334e commit b6e346b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/core/src/Combobox/ComboboxCancel.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ function handleClick() {
2323
if (rootContext.inputElement.value) {
2424
rootContext.inputElement.value.value = ''
2525
rootContext.inputElement.value.focus()
26-
if (rootContext.resetModelValueOnClear?.value) {
27-
rootContext.modelValue.value = rootContext.multiple.value ? [] : null
28-
}
26+
}
27+
28+
if (rootContext.resetModelValueOnClear?.value) {
29+
rootContext.modelValue.value = rootContext.multiple.value ? [] : null
2930
}
3031
}
3132
</script>

0 commit comments

Comments
 (0)