[Vuejs]-Radio button not deselecting in radiogroup because of wrapper element

0👍

The v-for syntax is off. It should be given an array and has similar syntax to a for..in loop

label(v-for="input in inputs")
    input(
      v-model="inputSelection"
      :value="input.value"
      type="radio"
      :name="input.name"
    )

Also, radio inputs in Vue all need the exact same v-model to be considered a group.

data: {
    inputSelection: '',  // v-model value
    inputs: [...] // array of input objects
}

example codepen
(I’m not sure what exact purpose radio-wrapper serves so I did not implement it.)

Leave a comment