validatorChange triggers valueChanges emit even if model stays the same #25749
Labels
area: forms
breaking changes
freq2: medium
P4
A relatively minor issue that is not relevant to core functions
state: confirmed
type: bug/fix
Milestone
I'm submitting a...
Current behavior
When a control is implementing the
Validator
interface and informs forms infrastructure about validator condition changes (throughregisterOnValidatorChange
) thevalueChanges
is emitting each time validator change is called, even if model stays the same.Expected behavior
valueChanges
should emit only if the underlying model value changes, regardless of the validation changes.Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-value-change-e79u33?file=app%2Fapp.component.ts
What is the motivation / use case for changing the behavior?
valueChanges
should not emit when the model is not changing - otherwise its basic contract is broken.Environment
The text was updated successfully, but these errors were encountered: