-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
ion-toggle unnecessarily triggers change
event when default value is true
#6144
Comments
I can confirm this. |
It seems like this issue is back as of 2.0.0-beta.11 |
I can reproduce on RC.0 as well |
Any update on this? In my case ion-toggle, ionChange runs on initial ngFor if value is set to true. I dont want that. Has anyone found a solution? |
Well, my fix is set the change function to fire only if I set a boolean value to true, while setting it to false on the event itself and the component constructor. Then, put one tap event function to set it to true, magic 💃, but not ideal.
|
The issue is still exists! I'm using ionic 2.4.8 |
I am now on Ionic 3.2.0 and this is still an issue. Has anyone been able to find fix for this? |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Short description of the problem:
ion-toggle unnecessarily triggers
change
event when the default value is trueWhat behavior are you expecting?
The change event should not fire until the user presses the toggle
Steps to reproduce:
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
This only fires when the default value is
true
.Which Ionic Version? 1.x or 2.x
2.0.0-beta.4
Plunker that shows an example of your issue
http://plnkr.co/edit/f2NSVLP1DETbkyFmpSN8?p=preview
Run
ionic info
from terminal/cmd prompt: (paste output below)Cordova CLI: 6.0.0
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.24
Ionic App Lib Version: 2.0.0-beta.14
OS: Distributor ID: Ubuntu Description: Ubuntu 15.10
Node Version: v5.8.0
The text was updated successfully, but these errors were encountered: