I'm submitting a ...
[x] bug report
Current behavior
Because the Observer
is named with a "changes" moniker I feel like AbstractControl.statusChanges
should only emit values whenever the status has actually changed. Instead it seems to run whenever valueChanges
runs except with _status_ as a value for the callback.
Expected/desired behavior
It should only fire when the status has changed.
Reproduction of the problem
http://plnkr.co/edit/UTPrVls36cTQjPpwYN2Q
What is the motivation / use case for changing the behavior?
I found it by profiling an extra slow area of our application which caused some UI lag, so my chief complaint would be performance.
It is however terribly easy to add a distinctUntilChanged
operator to the subscriber to fix the issue, but the expectation is that you wouldn't need to so its easy to miss without testing.
Please tell us about your environment:
Currently statusChanges
emits every time the status is calculated, not necessarily when it changes. I can see how this might be misleading. However, changing its behavior would be a pretty big breaking change for all forms users. We could possibly add a new event emitter to distinguish between the two. I'd like to get a sense of who would use this for establishing priority. More people feeling the pain of this? Use cases?
Most helpful comment
Currently
statusChanges
emits every time the status is calculated, not necessarily when it changes. I can see how this might be misleading. However, changing its behavior would be a pretty big breaking change for all forms users. We could possibly add a new event emitter to distinguish between the two. I'd like to get a sense of who would use this for establishing priority. More people feeling the pain of this? Use cases?