-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Checkbox Infinite Loop #812
Comments
I think this is related to #575 I believe there is WIP to make md-check-box behave like native checkbox and fire onchange only if the control is in focus. That probably should resolve this |
@mmrath I guess they are related at some level. But I checked your plnkr and I didn't see the infinite loop. The on change on focus will be welcome, since in theory will allow me to keep two controls binded to one data source. As of right now, since both react on change, they just keep calling each others change. Or so it seems. |
@ReneVallecillo What version of angular material were you using? |
@jelbourn The infinite loop shows on the plunker, which is using the suggested template. On my repo, I'm using version alpha6 but something different but related may be happening. What is happening in my repo is, since I have two components bound to a single data source, the change is triggering in both components and that seems to trigger @ #575 as:
Or so it seems. This should be fixed with #791. But in my repo what it shows is angular/angular#6005 (comment) I think this prevents the endless loop to show on my repo. But I don't understand why it happens here: https://plnkr.co/edit/OhqPeWHnjfvkxyNObETc?p=preview It is a really basic code. TLDR, I'm on alpha 6, but while replicating my code on plunker, the endless loop happens. |
I think this will be fixed by #820. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Setting
Should change the source value and update data once on click/change
What is the current behavior?
The checkbox goes on an infinite switching loop
What are the steps to reproduce?
http://plnkr.co/edit/o7vPsr7S7L14CtQuiDOP?p=preview
Simpler version:
https://plnkr.co/edit/OhqPeWHnjfvkxyNObETc?p=preview
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd
The text was updated successfully, but these errors were encountered: