Update question-control.service.ts
closes #1095 control value now will be initialized with 'question.value', regardless if the control has validation of 'required' or not.
This commit is contained in:
parent
64babe2a69
commit
89f9ea146c
|
@ -11,7 +11,7 @@ export class QuestionControlService {
|
||||||
let group = {};
|
let group = {};
|
||||||
|
|
||||||
questions.forEach(question => {
|
questions.forEach(question => {
|
||||||
group[question.key] = question.required ? [question.value || '', Validators.required] : [];
|
group[question.key] = question.required ? [question.value || '', Validators.required] : [question.value || ''];
|
||||||
});
|
});
|
||||||
return this.fb.group(group);
|
return this.fb.group(group);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue