Ionic-framework: ion-select passing whole event obj via ionChange and firing without user action

Created on 27 Apr 2017  路  9Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report

Current behavior:
Something's fishy with ion-select in the 3.1 update.

First, the ionChange() event is firing automatically on page load without any user action.

Second, only the value of the event used to be passed through, but now the whole event is being passed.

Expected behavior:
I don't expect ionChange to fire until user action in the template. And I only expect the value to be passed through because that's how it used to work.

Steps to reproduce:
It's explained in this Plunker as well:
http://plnkr.co/edit/iXg4GxEJ7VHcm1sycmQa?p=preview

Switch back and forth between 3.1.0 & 3.0.0 in systemjs.config.js and you should see the difference.

With 3.1.0, you'll see the events in the console without any interaction. $event.value will work. Just $event will pass the whole event object.

With 3.0.0 they won't fire automatically. $event.value will be undefined. And just $event will work.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

npm (global):

    @ionic/cli-utils : 1.0.0-beta0
    cordova          : 6.5.0
    ionic            : 3.0.0-beta9

npm (local):

    @ionic/app-scripts              : 1.3.5
    @ionic/cli-plugin-cordova       : 1.0.0-beta0
    @ionic/cli-plugin-ionic-angular : 1.0.0-beta0
    Ionic Framework                 : ionic-angular 3.1.0

System:

    Node       : v6.9.4
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002
    ios-deploy : 1.9.1
    ios-sim    : 5.0.13

Most helpful comment

Confirmed that reverting to 3.0.1 (and changing no other dependencies) seems to fix this, for anyone who needs to work around this (and can roll back to 3.0.1) in the mean time.

All 9 comments

Hello, thanks for opening an issue with us. This looks like a breaking change that slipped through. We are taking a look into it.

Sorry about the hassle.

Confirmed that reverting to 3.0.1 (and changing no other dependencies) seems to fix this, for anyone who needs to work around this (and can roll back to 3.0.1) in the mean time.

Hey, everyone! Hope to have a nightly release here soon that I would love for you guys to give a try. It should fix these breaking changes.

Awesome

Hello all! This has been fixed in 3.1.1.

Confirmed fixed in 3.1.1! Thank you!

Still getting the same issue here !

cli packages: ( )

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.8.0

System:

    Node : v6.10.3
    npm  : 3.10.10
    OS   : Windows 10

Misc:

    backend : legacy

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nick-The-Uncharted picture Nick-The-Uncharted  路  3Comments

giammaleoni picture giammaleoni  路  3Comments

manucorporat picture manucorporat  路  3Comments

RobFerguson picture RobFerguson  路  3Comments

vswarte picture vswarte  路  3Comments