From 2c7268c7f14f48cb22553bd04dd15176e868b976 Mon Sep 17 00:00:00 2001 From: syffs Date: Thu, 17 May 2018 23:06:55 +0200 Subject: [PATCH 1/2] fix(readonly): readonly can now be forced to false --- src/components/form-input/form-input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/form-input/form-input.js b/src/components/form-input/form-input.js index bd8b9708e77..df5b6ba1a09 100644 --- a/src/components/form-input/form-input.js +++ b/src/components/form-input/form-input.js @@ -39,7 +39,7 @@ export default { type: this.localType, disabled: this.disabled, required: this.required, - readonly: this.readonly || this.plaintext, + readonly: this.readonly || this.plaintext && this.readonly === null, placeholder: this.placeholder, autocomplete: this.autocomplete || null, 'aria-required': this.required ? 'true' : null, @@ -71,7 +71,7 @@ export default { }, readonly: { type: Boolean, - default: false + default: null }, plaintext: { type: Boolean, From 2e519a400bd33f4ff65bfb1f6388a373f3b1c7ee Mon Sep 17 00:00:00 2001 From: syffs Date: Fri, 18 May 2018 01:17:44 +0200 Subject: [PATCH 2/2] fix: lint --- src/components/form-input/form-input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/form-input/form-input.js b/src/components/form-input/form-input.js index df5b6ba1a09..f714a31907a 100644 --- a/src/components/form-input/form-input.js +++ b/src/components/form-input/form-input.js @@ -39,7 +39,7 @@ export default { type: this.localType, disabled: this.disabled, required: this.required, - readonly: this.readonly || this.plaintext && this.readonly === null, + readonly: this.readonly || (this.plaintext && this.readonly === null), placeholder: this.placeholder, autocomplete: this.autocomplete || null, 'aria-required': this.required ? 'true' : null, @@ -133,7 +133,7 @@ export default { methods: { format (value, e) { if (this.formatter) { - return this.formatter(value, e) + return this.formatter(value, e) } return value },