Fix textfield non-empty class with value zero
This commit is contained in:
parent
25d9655c0c
commit
101d8875a9
|
@ -36,7 +36,7 @@ export default class Textfield extends Input {
|
||||||
set value(value) {
|
set value(value) {
|
||||||
this._value = (value === undefined || value === '') ? null : value;
|
this._value = (value === undefined || value === '') ? null : value;
|
||||||
this.input.value = this._value;
|
this.input.value = this._value;
|
||||||
this.hasValue = Boolean(this._value);
|
this.hasValue = this._value !== null;
|
||||||
if (this.hasValue) this.element.classList.add('not-empty');
|
if (this.hasValue) this.element.classList.add('not-empty');
|
||||||
else this.element.classList.remove('not-empty');
|
else this.element.classList.remove('not-empty');
|
||||||
this.mdlUpdate();
|
this.mdlUpdate();
|
||||||
|
|
Loading…
Reference in New Issue