From bce0f7f7c0bc39dc1c0abf75d228c4943091e554 Mon Sep 17 00:00:00 2001 From: Maximiliano Gutierrez Date: Mon, 27 Dec 2021 23:18:02 -0300 Subject: [PATCH] Remove val attribute BS --- src/components/TextareaAutosize.vue | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/components/TextareaAutosize.vue b/src/components/TextareaAutosize.vue index 8eaab7d..74e1faa 100644 --- a/src/components/TextareaAutosize.vue +++ b/src/components/TextareaAutosize.vue @@ -1,7 +1,8 @@ @@ -35,8 +36,6 @@ export default { }, data () { return { - // data property for v-model binding with real textarea tag - val: null, // works when content height becomes more then value of the maxHeight property maxHeightScroll: false, height: 'auto' @@ -65,12 +64,8 @@ export default { } }, watch: { - value (val) { - this.val = val - }, - val (val) { + value () { this.$nextTick(this.resize) - this.$emit('input', val) }, minHeight () { this.$nextTick(this.resize) @@ -109,9 +104,6 @@ export default { return this } }, - created () { - this.val = this.value - }, mounted () { this.resize() }