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

UpdateValueAndValidity emits event when adding validator directive #96

Closed
Mooeeezzzz opened this issue Jun 22, 2021 · 0 comments
Closed

Comments

@Mooeeezzzz
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

formGroup.valueChanges emit value when setting a validator directive like required because the library call updateValueAndValidity inside setValidators Fn.

Expected behavior

formGroup.valueChanges should not emit when adding a directive like the default angular form behaviour we can add the possibility to pass global options for updateValueAndValidity to avoid breaking changes and for easier adoption for big project.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-ivy-kzr2zk

What is the motivation / use case for changing the behavior?

migrating big entreprise project to use ngneat/reactive-forms with minimal breaking changes .

Environment


Angular version: 11


Browser:
- [x] Chrome (desktop) version XX
- [x] Chrome (Android) version XX
- [x] Chrome (iOS) version XX
- [x] Firefox version XX
- [x] Safari (desktop) version XX
- [x] Safari (iOS) version XX
- [x] IE version XX
- [x] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@Mooeeezzzz Mooeeezzzz changed the title updateValueAndValidity emits event when adding validator directive UpdateValueAndValidity emits event when adding validator directive Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant