DEV Community

Taufit hidayat
Taufit hidayat

Posted on

problem with data type in useForm InertiaJs


i have useForm like this

const form = useForm({
tech: []
preview_image: {},
imageUrl: null,

then i have image upload with preview before upload

    <div class="py-4 md:w-1/2" v-if="form.imageUrl">
        <img class="max-h-40 max-w-full transition-all duration-300 rounded-lg cursor-pointer filter grayscale hover:grayscale-0 mx-auto" :src="form.imageUrl"/>
    <div v-bind:class="form.imageUrl ? 'py-4 md-w-1/2' : 'p-4

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.