Updating button question logic

This commit is contained in:
Max 2022-02-02 13:04:39 -05:00
parent bd0d40357c
commit 3a0df4a4b1

View file

@ -104,12 +104,11 @@ export default {
modelValueAnswers: [], modelValueAnswers: [],
} }
}, },
created(){ mounted(){
if(Array.isArray(this.answers) && this.answers.length === 1) { if(Array.isArray(this.answers) && this.answers.length === 1) {
this.modelValueAnswers.push(typeof(this.answers[0]) === 'object' ? this.answers[0].Name : this.answers[0]); this.modelValueAnswers.push(typeof(this.answers[0]) === 'object' ? this.answers[0].Name : this.answers[0]);
this.$emit("update:modelValue", this.modelValueAnswers); this.$emit("update:modelValue", this.modelValueAnswers);
}; };
this.modelValueAnswers = this.modelValue;
}, },
methods: { methods: {
handleCheckedChanged(val) { handleCheckedChanged(val) {