Home > Software engineering >  don't expand v-list-group if click on v-checkbox
don't expand v-list-group if click on v-checkbox

Time:11-28

I have an expandable v-list-group with a v-checkbox where when i click on the v-checkbox the list toggles. I want to disable this reaction. it is possible? my code element:

<v-list>
    <v-list-group>
        <template v-slot:activator>
            <v-list-item-action>
                <v-checkbox @click="fn()"/>
            </v-list-item-action>
            <v-list-item-content>
                <v-list-item-title/>
            </v-list-item-content>
        </template>
        ...
    </v-list-group>
</v-list>

Thanks.

CodePudding user response:

Try using click.stop on the v-checkbox in order to stop click event propagation.

  • Related