Kindly see: https://jsfiddle.net/chrzrdx/krrczkx5/
This is on vue 2.1.4
I have a questions array in my vue.data, and I'm cycling through them every time the next or prev button is pressed. I store the id of the active question, and compute the active question from there. I am using v-model on the radio button to store the state in the active question's selected property.
The questions already have a default value (selected initially contains the value of the default option). But some radio buttons display as unchecked even though the selected field of the current (active) question is set.
The issue persists even if there are no default values in selected, and the user clicks each button herself.
You just need to remove this v-bind:name="active_question.txt" from input tag in HTML, so following will be updated line.
<input type="radio" v-bind:value="o.txt" v-model="active_question.selected">
Working Fiddle: https://jsfiddle.net/krrczkx5/9/
In addition to the answer mentioned above, please see this: https://github.com/vuejs/vue/issues/4375
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With