From 101d8875a940460b967b64505098593ce3c769f9 Mon Sep 17 00:00:00 2001 From: Joan Date: Wed, 20 Jun 2018 14:53:24 +0200 Subject: [PATCH] Fix textfield non-empty class with value zero --- client/core/src/components/textfield/textfield.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/core/src/components/textfield/textfield.js b/client/core/src/components/textfield/textfield.js index 4747ba39f..83be9f400 100644 --- a/client/core/src/components/textfield/textfield.js +++ b/client/core/src/components/textfield/textfield.js @@ -36,7 +36,7 @@ export default class Textfield extends Input { set value(value) { this._value = (value === undefined || value === '') ? null : 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'); else this.element.classList.remove('not-empty'); this.mdlUpdate();