fix(select): ionChange returns the value

This commit is contained in:
Manuel Mtz-Almeida
2017-04-27 18:34:32 +02:00
parent 9264a04343
commit d24c4f45fb
2 changed files with 16 additions and 1 deletions

View File

@ -409,6 +409,14 @@ export class Select extends BaseInput<string[]|string> implements AfterViewInit,
return !deepEqual(this._value, val);
}
/**
* TODO: REMOVE THIS
* @hidden
*/
_inputChangeEvent(): any {
return this.value;
}
/**
* @hidden
*/

View File

@ -160,7 +160,7 @@ export class BaseInput<T> extends Ion implements CommonInput<T> {
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<T> extends Ion implements CommonInput<T> {
return this._value !== val;
}
/**
* @hidden
*/
_inputChangeEvent(): any {
return this;
}
/**
* @hidden
*/