fix(Input/SelectMenu): handle file type and change events (#1570)

This commit is contained in:
Romain Hamel
2024-03-27 11:57:31 +01:00
committed by GitHub
parent bd8118c124
commit 878f7078a2
2 changed files with 20 additions and 18 deletions

View File

@@ -63,7 +63,7 @@
autofocus
autocomplete="off"
:class="uiMenu.input"
@change="onChange"
@change="onQueryChange"
/>
<component
:is="searchable ? 'HComboboxOption' : 'HListboxOption'"
@@ -505,14 +505,13 @@ export default defineComponent({
}
})
function onUpdate (event: any) {
emit('update:modelValue', event)
function onUpdate (value: any) {
emit('update:modelValue', value)
emit('change', value)
emitFormChange()
}
function onChange (event: any) {
emit('change', (event.target as HTMLInputElement).value)
emitFormChange()
function onQueryChange (event: any) {
query.value = event.target.value
}
@@ -547,7 +546,7 @@ export default defineComponent({
// eslint-disable-next-line vue/no-dupe-keys
query,
onUpdate,
onChange
onQueryChange
}
}
})