Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Value #201

Open
elvispdosreis opened this issue Jan 13, 2021 · 2 comments
Open

Patch Value #201

elvispdosreis opened this issue Jan 13, 2021 · 2 comments
Labels
state: needs repro This issue needs a repro

Comments

@elvispdosreis
Copy link

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();

@maxime1992
Copy link
Contributor

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

Thanks

@maxime1992 maxime1992 added the state: needs repro This issue needs a repro label Jan 13, 2021
@elvispdosreis
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs repro This issue needs a repro
Projects
None yet
Development

No branches or pull requests

2 participants