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

onChange triggered from writeValue #1493

Open
lnu opened this issue Jan 21, 2025 · 0 comments
Open

onChange triggered from writeValue #1493

lnu opened this issue Jan 21, 2025 · 0 comments

Comments

@lnu
Copy link

lnu commented Jan 21, 2025

🐞 bug report

Is this a regression?

onChange is triggered from writeValue when it should not:

  • when calling FormControl.setValue(null)
  • when calling FormControl.reset()

Image

detected using https://github.com/dmitry-stepanenko/ngx-cva-test-suite

the code: https://github.com/JsDaddy/ngx-mask/blob/9c2a8a170711170d3396e06b50ecc86c854e3e40/projects/ngx-mask-lib/src/lib/ngx-mask.service.ts#L599C12-L599C13

Description

before this PR #1447, onChange was not triggered

🔬 Minimal Reproduction

https://stackblitz.com/edit/stackblitz-starters-1znsk4oz?file=src%2Fmain.ts

🔥 Exception or Error

No specific error

🌍 Your Environment

Angular Version:

Angular 19 and ngx-mask 18.03(or 19.0.0)

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