question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ionic 2:<ion-select> is not triggering (change) action event. If I use <select> tag then the (change) action is working.

See original GitHub issue

Note: If you are having problems formatting your issue please refer to this article on using markdown in Github:

https://guides.github.com/features/mastering-markdown/

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/

Short description of the problem:

What behavior are you expecting?

Steps to reproduce: 1. 2. 3.

insert any relevant code between the above and below backticks

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 1.x or 2.x

Plunker that shows an example of your issue

For Ionic 1 issues - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview

For Ionic 2 issues - http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

24reactions
brandyscarneycommented, Aug 22, 2016

The Ionic Select component does not emit a change event, but it does emit an ionChange event. Please refer to the Output Events section in the API documentation to find the Select component’s events. Thanks!

15reactions
brandyscarneycommented, May 15, 2017

You can use it the following way:

  <ion-select [(ngModel)]="gender" (ionChange)="onSelectChange($event)">
    <ion-option value="f">Female</ion-option>
    <ion-option value="m">Male</ion-option>
  </ion-select>

then in your page:

  onSelectChange(selectedValue: any) {
    console.log('Selected', selectedValue);
  }

This will be called every time the value of the select changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic 2: why change event is not working on ion-select?
You can use it the following way: <ion-select [(ngModel)]="gender" (ionChange)="onSelectChange($event)"> <ion-option value="G">Colombo</ion-option> ...
Read more >
ion-select: Select One or Multiple Value Boxes or Placeholders
ion -select is represented by selected value(s), or a placeholder, and dropdown icon. When you tap select, a dialog box appears with an...
Read more >
Getting and Setting | Vue Select
myValue" , and use the input event to trigger a mutation, or dispatch an action – or anything else you might need to...
Read more >
Select | Angular Material
Event emitted when the selected value has been changed by the user. controlType: 'mat-select'. A name for this control that can be used...
Read more >
select - Cypress Documentation
Pass in an options object to change the default behavior of .select() . Option, Default, Description. force, false, Forces the action, disables waiting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found