[Vuejs]-Both radio buttons getting checked while using vuetify

1👍

this is because each child component creates separate v-radio-group. if you create a separate component for v-radio-group and use it as a wrapper on your child component then it should work.

example.

MyRadioGroup.vue

<template>
  <v-radio-group> <!--also props for these if required-->
  </v-radio-group>
</template>

MyRadio.vue

<template>
  <v-radio :name="name" :value="value" @change="inputChange" />
</template>

Now you can use these as below

<MyRadioGroup>
  <MyRadio></MyRadio>
  <MyRadio></MyRadio>
  <MyRadio></MyRadio>
</MyRadioGroup>

Leave a comment