From 375bdc52b81be0bcd10ec897d1cc087eb2bf25e9 Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Wed, 8 Aug 2018 11:13:09 -0400 Subject: [PATCH] dont mutate prop directly --- js/components/text_input.js | 5 +++-- templates/styleguide.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/components/text_input.js b/js/components/text_input.js index e151c87b..4c06ff81 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -24,7 +24,8 @@ export default { valid: false, showError: false, showValid: false, - mask: inputValidations[this.validation].mask + mask: inputValidations[this.validation].mask, + renderedValue: this.value } }, @@ -32,7 +33,7 @@ export default { const value = this.$refs.input.value if (value) { this._checkIfValid({ value, invalidate: true }) - this.value = conformToMask(value, this.mask).conformedValue + this.renderedValue = conformToMask(value, this.mask).conformedValue } }, diff --git a/templates/styleguide.html b/templates/styleguide.html index faec0a66..a65069c4 100644 --- a/templates/styleguide.html +++ b/templates/styleguide.html @@ -143,7 +143,7 @@