From c07c162dfb44bf11cfb328a70b2cfbc69580b649 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Mon, 5 Feb 2018 15:27:42 -0600 Subject: Revert the use of refs for v-model to allow reactivity --- .../javascripts/vue_shared/components/confirmation_input.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/assets/javascripts/vue_shared/components/confirmation_input.vue b/app/assets/javascripts/vue_shared/components/confirmation_input.vue index 1aa03ea6317..df967d0eb3a 100644 --- a/app/assets/javascripts/vue_shared/components/confirmation_input.vue +++ b/app/assets/javascripts/vue_shared/components/confirmation_input.vue @@ -22,6 +22,11 @@ default: true, }, }, + data() { + return { + enteredValue: '', + }; + }, computed: { inputLabel() { let value = this.confirmationValue; @@ -38,7 +43,7 @@ }, methods: { hasCorrectValue() { - return this.$refs.enteredValue.value === this.confirmationValue; + return this.enteredValue === this.confirmationValue; }, }, }; @@ -55,7 +60,7 @@ :id="inputId" :name="confirmationKey" type="text" - ref="enteredValue" + v-model="enteredValue" class="form-control" /> -- cgit v1.2.1