Open sanchocreativo opened 4 years ago
onAnswerSubmitted(answer) {
this.setState({ answersSoFar: this.surveyRef.getAnswers() });
switch (answer.questionId) {
case 'radiopais': {
if (answer.value.value == 'si') {
this.setState({
survey: [...this.state.survey, ...countryQe]
});
}
break;
}
default:
break;
}
}
I am sorry it was my mistake. It was if(answer.value.value). However when last question is set it doesnt send an onAnswerSubmitted so the new question is not rendered. So the issue remains opened regardless.
Based on answer submitted, I tryed to concat the previous state of the survey with a new array of questions and the new questions are not appearing.
State:
...continues...