Skip to content

Commit

Permalink
fix(input): detect value when it is zero
Browse files Browse the repository at this point in the history
thanks @keithdmoore

fixes #8019
  • Loading branch information
manucorporat committed Sep 30, 2016
1 parent 8878e70 commit d02e14c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/input/input-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ export class InputBase extends Ion {
*/
checkHasValue(inputValue: any) {
if (this._item) {
this._item.setElementClass('input-has-value', !!(inputValue && inputValue !== ''));
let hasValue = (inputValue !== null && inputValue !== undefined && inputValue !== '');
this._item.setElementClass('input-has-value', hasValue);
}
}

Expand Down

0 comments on commit d02e14c

Please sign in to comment.