From d24c4f45fbc50bd607b356df151aae87882e008c Mon Sep 17 00:00:00 2001 From: Manuel Mtz-Almeida Date: Thu, 27 Apr 2017 18:34:32 +0200 Subject: [PATCH] fix(select): ionChange returns the value --- src/components/select/select.ts | 8 ++++++++ src/util/base-input.ts | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/select/select.ts b/src/components/select/select.ts index 19da56ae24..ce9c1d6656 100644 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -409,6 +409,14 @@ export class Select extends BaseInput implements AfterViewInit, return !deepEqual(this._value, val); } + /** + * TODO: REMOVE THIS + * @hidden + */ + _inputChangeEvent(): any { + return this.value; + } + /** * @hidden */ diff --git a/src/util/base-input.ts b/src/util/base-input.ts index 3afd327feb..09916db176 100644 --- a/src/util/base-input.ts +++ b/src/util/base-input.ts @@ -160,7 +160,7 @@ export class BaseInput extends Ion implements CommonInput { if (this._init) { this._debouncer.debounce(() => { assert(NgZone.isInAngularZone(), 'IonChange: should be zoned'); - this.ionChange.emit(this); + this.ionChange.emit(this._inputChangeEvent()); }); } } @@ -292,6 +292,13 @@ export class BaseInput extends Ion implements CommonInput { return this._value !== val; } + /** + * @hidden + */ + _inputChangeEvent(): any { + return this; + } + /** * @hidden */