I can not for the life of me figure this out.
I have a bootstrap vue radio form group which updates a v-model correctly.
<b-form-radio-group
@change="checkAnswer(question)"
:options="question.answer_actions.options"
:required=true
v-model="answers.answers[question.id]"
class="mb-3"
value-field="id"
text-field="text"
disabled-field="notEnabled"
size="lg"
stacked
></b-form-radio-group>
export default {
data() {
return {
questions: {},
answers: { warnings: {}, answers: {}, notes: {}},
}
},
However, when populating the answers{} data on load from ajax, I can see the changes in vue debug, however they are not reflected or picked up by the radio buttons.
axios.get('/api/latestResponse/' + this.gResponse.id)
.then(response_p => {
response_p.data.result.forEach(function(r) { vm.answers.answers[r.question_id] = r.answer; vm.answers.notes[r.question_id] = r.note })
I have tried everything, created() vs mounted() vs updated(), nextTick etc but nothing is selecting the raido buttons by default.