mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
fix(input): detect value when it is zero
thanks @keithdmoore fixes #8019
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user