diff --git a/src/components/questions/choice-question/choice-question.tsx b/src/components/questions/choice-question/choice-question.tsx index 984a824..fdc9995 100644 --- a/src/components/questions/choice-question/choice-question.tsx +++ b/src/components/questions/choice-question/choice-question.tsx @@ -59,13 +59,14 @@ export class ChoiceQuestion { @Prop() question: any; @Watch('question') async watchQuestion() { - //TODO get correct response when questions updates try { this.optionsList = await this.getChoiceOptions(); } catch (error) { alert(error); } + this.allow_events = false; this.setSelected(); + this.allow_events = true; this.repeats = this.question.repeats; } @Prop() answers: any; @@ -84,7 +85,7 @@ export class ChoiceQuestion { @Watch('questionnaireResponse') async watchQuestionnaireResponse() { this.allow_events = false; - await this.setSelected(); //TODO Hier ist der Übeltäter + await this.setSelected(); this.allow_events = true; } /** @@ -175,7 +176,6 @@ export class ChoiceQuestion { */ setSelected() { let data = questionnaireResponseController.getAnswersFromQuestionnaireResponse(this.questionnaireResponse, this.question.linkId, 'coding'); - if (this.question.repeats) { this.selected = data; } else { @@ -239,13 +239,7 @@ export class ChoiceQuestion { {this.optionsList.map(answer => (