I am trying to populate the form field when click on edit icon. For the first time it is working as expected but after I click different edit icon it doesn't update. Also if I hit cancel button and again click any edit button it is working fine. But it only works for the first time.
I am calling that patchValue thing inside the ngAfterViewInit.
ngAfterViewInit(): void {
setTimeout(() => {
this.editDataToForm();
}, );
}
It should update the form field whenever I click any of the edit icon.