Skip to content

Commit

Permalink
Fix the bug: react survey does not get populated with preloaded data …
Browse files Browse the repository at this point in the history
…in dropdown question with restful options #2009
  • Loading branch information
andrewtelnov committed Mar 3, 2020
1 parent 08ff037 commit 3b65947
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/react/reactquestionelement.tsx
Expand Up @@ -162,11 +162,10 @@ export class SurveyQuestionUncontrolledElement<
protected get question(): T {
return this.questionBase as T;
}
getSnapshotBeforeUpdate(prevProps: any, prevState: any): any {
componentDidUpdate() {
if (!!this.control) {
this.control.value = this.getValue(this.questionBase.value);
}
return null;
}
componentDidMount() {
if (!!this.control) {
Expand Down

0 comments on commit 3b65947

Please sign in to comment.