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

AbstractControl.statusChanges seems to fire needlessly #10603

Closed
xealot opened this issue Aug 9, 2016 · 4 comments
Closed

AbstractControl.statusChanges seems to fire needlessly #10603

xealot opened this issue Aug 9, 2016 · 4 comments
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

Comments

@xealot
Copy link

xealot commented Aug 9, 2016

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:

  • Angular version: 2.0.0-rc.4
  • Browser: all
  • Language: all
@kara
Copy link
Contributor

kara commented Oct 12, 2016

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?

@ngbot ngbot bot added this to the Backlog milestone Jan 23, 2018
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jun 4, 2021
@angular-robot
Copy link
Contributor

angular-robot bot commented Jun 4, 2021

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@angular-robot
Copy link
Contributor

angular-robot bot commented Jun 24, 2021

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added the feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors label Jun 24, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

5 participants