Skip to content

Commit d02e14c

Browse files
committed
fix(input): detect value when it is zero
thanks @keithdmoore fixes #8019
1 parent 8878e70 commit d02e14c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/input/input-base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ export class InputBase extends Ion {
246246
*/
247247
checkHasValue(inputValue: any) {
248248
if (this._item) {
249-
this._item.setElementClass('input-has-value', !!(inputValue && inputValue !== ''));
249+
let hasValue = (inputValue !== null && inputValue !== undefined && inputValue !== '');
250+
this._item.setElementClass('input-has-value', hasValue);
250251
}
251252
}
252253

0 commit comments

Comments
 (0)