Skip to content

Commit

Permalink
fix(select): ionChange returns the value
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Apr 27, 2017
1 parent 9264a04 commit d24c4f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/components/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
9 changes: 8 additions & 1 deletion src/util/base-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
}
}
Expand Down Expand Up @@ -292,6 +292,13 @@ export class BaseInput<T> extends Ion implements CommonInput<T> {
return this._value !== val;
}

/**
* @hidden
*/
_inputChangeEvent(): any {
return this;
}

/**
* @hidden
*/
Expand Down

0 comments on commit d24c4f4

Please sign in to comment.