bug: <ion-select> fires ionChange event twice
See original GitHub issueBug Report
Ionic version: [ ] 1.x [ ] 2.x [] 3.x [X] 4.x [X] 5.x
Current behavior: for <ion-select (ionChange)=“changed($event)”> the changed method is being called twice for each change
Expected behavior: the (ionChange)="changed($event) should be called once for each value change
Steps to reproduce: below code will log the select value has changed twice each time new select option has been selected
Related code:
insert short code snippets here
<ion-label position="stacked">Employee</ion-label>
<ion-select formControlName="empid" (ionChange)="empdetails($event);">
<ion-select-option *ngFor="let emp of emplist" [value]="emp.Id">{{emp.Name}}</ion-select-option>
</ion-select>
**Other information:**
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->
**Ionic info:**
<!-- (run `ionic info` from a terminal/cmd prompt and paste output below): -->
insert the output from ionic info here Ionic:
Ionic CLI : 5.2.3 (C:\Users\Admin\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.0.5
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics : 8.3.25
@angular/cli : 8.3.25
@ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 8.1.0, browser 5.0.4 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 10 other plugins)
Utility:
cordova-res : 0.6.0 native-run : 0.2.8
System:
Android SDK Tools : 26.1.1 (C:\Program Files (x86)\Android\android-sdk) NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe) npm : 6.11.3 OS : Windows 10
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thanks for the issue. Can you provide a repo with the code required to reproduce this issue? I am unable to reproduce the issue using the code provided.
Thanks for the issue! This issue is being closed due to the lack of a reply. 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.
Thank you for using Ionic!