- Notifications
You must be signed in to change notification settings - Fork405
Open
Description
Originally posted by@irowbin in#1745 (comment) on 10 May 2021
Hi there, I have been struggling to patching the state ofFormArray values using this plugin.
I have something like this in component:
fg=this.fb.group({anyTerms:this.fb.array([this.fb.group({term:[]})]),})
now if I add more than one object in that array, it populates state values as[{term:'1'}, {term:'2'}] but it can't be populated from state toFormArray
The structure like this requires to create anAbstractControl but couldn't find a way to do from the state to component.
example:
[{term:'1'},{term:'2'}].forEach(obj=>this.controls.push(this.fb.group(obj)))
Is it done internally or something?
Looks like it was updated usingthis line which only care about raw value.
Can we have type check and patch value instead of raw?
Thanks,
Regards.
Metadata
Metadata
Assignees
Labels
No labels