You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
(ionChange) trigger event without user interaction
Expected behavior:
(ionChange) should trigger event after user interaction
Steps to reproduce:
// Toggle or checkbox
// <ion-toggle (ionChange)="changeStatus($event)" [(ngModel)]="status"></ion-toggle>
status = true;
ngOnInit() {
// this case work
// this.status = false;
// fetch status from a server
// trigger change event without user interaction
setTimeout(() => {
this.status = false;
}, 1000);
}
changeStatus($event) {
// result: unnecessary request to the server
}
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.
Activity
manucorporat commentedon Jan 15, 2019
This is the expected behaviour, ionChange is emitted whatever the value of any input changes, no matter how it changed :)
ionitron-bot commentedon Feb 14, 2019
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.