AbstractControl.statusChanges seems to fire needlessly #10603
Labels
area: forms
feature: insufficient votes
Label to add when the not a sufficient number of votes or comments from unique authors
feature: votes required
Feature request which is currently still in the voting phase
feature
Issue that requests a new feature
freq2: medium
workaround1: obvious
Milestone
I'm submitting a ...
Current behavior
Because the
Observer
is named with a "changes" moniker I feel likeAbstractControl.statusChanges
should only emit values whenever the status has actually changed. Instead it seems to run whenevervalueChanges
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:
The text was updated successfully, but these errors were encountered: