Skip to content

Commit

Permalink
fix(forms): precise type assertion for onInput event handler (#293)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
  • Loading branch information
selemondev and benjamincanac committed Jun 21, 2023
1 parent 4023fbe commit 457b7a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/components/forms/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default defineComponent({
}
const onInput = (event: InputEvent) => {
emit('update:modelValue', (event.target as any).value)
emit('update:modelValue', (event.target as HTMLInputElement).value)
}
onMounted(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/forms/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default defineComponent({
const ui = computed<Partial<typeof appConfig.ui.select>>(() => defu({}, props.ui, appConfig.ui.select))
const onInput = (event: InputEvent) => {
emit('update:modelValue', (event.target as any).value)
emit('update:modelValue', (event.target as HTMLInputElement).value)
}
const guessOptionValue = (option: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/forms/Textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default defineComponent({
const onInput = (event: InputEvent) => {
autoResize()
emit('update:modelValue', (event.target as any).value)
emit('update:modelValue', (event.target as HTMLInputElement).value)
}
watch(() => props.modelValue, () => {
Expand Down

0 comments on commit 457b7a9

Please sign in to comment.