ngx-sub-form icon indicating copy to clipboard operation
ngx-sub-form copied to clipboard

Patch Value

Open elvispdosreis opened this issue 4 years ago • 2 comments

I need to make a patchValue but it can happen that the object to be passed to be used in the patch is not exactly what was defined in getFormControls, but the ngx-sub-form tries to find this formcontrol it is possible to suppress this error

this.formGroup.patchValue();

elvispdosreis avatar Jan 13 '21 12:01 elvispdosreis

Hi @elvispdosreis could you please provide some code example or maybe a small repro?

Thanks

maxime1992 avatar Jan 13 '21 15:01 maxime1992

when you click on "Pre fill the form" the error "ERROR Error: Cannot find form control with name: maxCrewMember " the json can come from an http call where the data will not always be the same I would just like to ignore not finding the control

sample https://stackblitz.com/edit/ngx-sub-form-basics-patchvalue?file=src/app/spaceship-container/spaceship-container.component.ts

elvispdosreis avatar Jan 15 '21 11:01 elvispdosreis