[Vuejs]-V-if is not working in my child component

3đź‘Ť

âś…

It looks like you’re trying to use data() with type checking, the same way props is used. Try this:

data() {
    return {
        show: {
            search_checkboxes: true
        }
    }
}

Also, in your template HTML, you’ve misspelled search_checkboxes, it’s missing an “r”.

<fieldset v-if="show.seach_checkboxes">
                         ^^^
👤maxpaj

Leave a comment