Angular 15: FormGroup implementation guide after patchValue when using nested FormArray with Reactive Forms
I'm maintaining legacy code that I'm having a hard time understanding I'm upgrading from an older version and I'm working on a project and hit a roadblock..... I'm working on a personal project and I'm experiencing an scenario where my `FormGroup` isn't reflecting changes after I use `patchValue()` on a nested `FormArray`. I have a dynamic form with a parent group and an array of child groups. Here's a simplified version of my code: ```typescript this.parentForm = this.fb.group({ name: [''], details: this.fb.array([]) }); const detailsArray = this.parentForm.get('details') as FormArray; for (let i = 0; i < 3; i++) { detailsArray.push(this.fb.group({ description: [''], quantity: [0] })); } ``` Later on, I try to update the `description` of the first item in the array using `patchValue()`, but it doesnβt seem to have any effect: ```typescript (this.parentForm.get('details') as FormArray).at(0).patchValue({ description: 'Updated Description' }); ``` I can see in the console that the value isn't updating as expected. When I check `this.parentForm.value`, the `description` remains an empty string. I've also tried using `setValue()` instead, but the result is the same. I verified that Iβm not running into any validation issues and that the form is valid after the update. Additionally, I am not seeing any errors in the console. My Angular version is 15.0.0. Has anyone faced a similar scenario or can suggest what I might be doing wrong? It feels like I'm missing something fundamental about how reactive forms handle nested values. I'm working on a web app that needs to handle this. I'm working on a application that needs to handle this. Am I approaching this the right way? This is happening in both development and production on CentOS. Am I approaching this the right way? Is there a better approach? This is my first time working with Typescript 3.11. Is this even possible? Could this be a known issue? My team is using Typescript for this mobile app. Thanks for any help you can provide!