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 authored Jun 15, 2023
1 parent 45398d0 commit 5a31e79
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

1 comment on commit 5a31e79

@vercel
Copy link

@vercel vercel bot commented on 5a31e79 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui.nuxtlabs.com
ui-nuxtlabs.vercel.app
ui-git-dev-nuxtlabs.vercel.app

Please sign in to comment.