Replies: 2 comments 2 replies
-
You can still get the FileList using |
Beta Was this translation helpful? Give feedback.
-
The shorter I did get was kinda : const nvlMaison = ref()
const schema = [
{
name:"images"
type:"file"
onchange: (e: Event) => {
nvlMaison.value = {
...nvlMaison.value,
// @ts-ignore Impossible to assign type `File[]` to type `string[]`
images:Array.from(e.target.files)
}
}
}
] Because I have to get the The problem isn't that's difficult. Is that it is uneasy and superfluous! I can even more easily ignore it and process |
Beta Was this translation helpful? Give feedback.
-
It would be nice if we could optionally return
File[]
instead of{ file:File; name:string }[]
for value of file input.In React code we can read SO Formik file input:
They extract the useful values of
files
property as you do in Formkit.But FormKit field input map this to
{ file:File; name:string }[]
Would it be possible to add a boolean option to use the original
files
property as value ?Maybe I am wrong but it seems you did this just to make
FileList
iterable increateSection
.Replacing the
for
loop in /packages/inputs/src/features/files.ts#L91 by:It should make it iterable.
And/Or:
Beta Was this translation helpful? Give feedback.
All reactions