@inertiajs/inertia version: ^0.8.6@inertiajs/inertia-vue3 version: ^0.3.10How does v-model should work in an example if we can't use it with file input type?
VueJS will throw the error "v-model cannot be used on file inputs since they are read-only."
This should be updated in documentation. We need to use @change for file input.
I exactly come through to it. Can you elaborate @RomkaLTU the solution ?
VueCompilerError: v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.
@bedus-creation
<input type="file" @input="form.avatar = $event.target.files[0]" />
This isn't really something Inertia needs to document, as this is known Vue behaviour, and isn't specific to Inertia.
Well, I disagree, there is a mistake in the documentation and that should be corrected imho. It's not about full implementation but you can't do v-model on file input type.
Oh I'm sorry, where is this wrong in the docs?
Feel free to create an issue in the documentation repo, or even better, submit a PR to fix this. 馃憤
Ahh, found it: https://inertiajs.com/file-uploads
Updated: https://github.com/inertiajs/inertiajs.com/commit/73f6e1a16e502405c4c5d93db4eee73da47e29d0
In the future, please post documentation related issues in that repo. 馃憤
Most helpful comment
Updated: https://github.com/inertiajs/inertiajs.com/commit/73f6e1a16e502405c4c5d93db4eee73da47e29d0
In the future, please post documentation related issues in that repo. 馃憤