-
Couldn't load subscription status.
- Fork 405
Description
Originally posted by @irowbin in #1745 (comment) on 10 May 2021
Hi there, I have been struggling to patching the state of FormArray 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 to FormArray
The structure like this requires to create an AbstractControl 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 using this line which only care about raw value.
Can we have type check and patch value instead of raw?
Thanks,
Regards.