nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.06k stars 518 forks source link

Change event of UInput with type="file" returns string instead of FileList #1569

Closed mueslirieger closed 7 months ago

mueslirieger commented 7 months ago

Environment

Version

v2.15.0

Reproduction

https://stackblitz.com/edit/nuxt-ui-xdwrzs?file=app.vue

Description

As of v2.15.0 file inputs no longer provide access to the native DOM event (#1560) which breaks the usage of UInput with type="file". For file inputs to work, the change event would have to emit event.target.files.

Additional context

No response

Logs

No response

matikucharski commented 7 months ago

@benjamincanac But how can I access file blob now when using type=file with UInput? That change broke my file input

benjamincanac commented 7 months ago

Have you tried with the latest edge package until we make a proper release?

bkuri commented 7 months ago

@benjamincanac I just got bit by this bug after updating to v2.15.0. Downgrading to v2.14.2 fixes it.

benjamincanac commented 7 months ago

@bkuri This has been fixed in #1570 where you'll receive files directly.