fix(input): detect value when it is zero

thanks @keithdmoore

fixes #8019
This commit is contained in:
Manu Mtz.-Almeida
2016-10-01 01:19:08 +02:00
parent 8878e70227
commit d02e14c50a

View File

@ -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);
}
}