From 6684a27e2f0716e7e604e8fa1e0c26e9306c9613 Mon Sep 17 00:00:00 2001 From: DocuSeal Date: Mon, 16 Oct 2023 02:04:52 +0300 Subject: [PATCH] preserve textarea in the form --- app/javascript/submission_form/text_step.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/javascript/submission_form/text_step.vue b/app/javascript/submission_form/text_step.vue index 19c54a69..fac99884 100644 --- a/app/javascript/submission_form/text_step.vue +++ b/app/javascript/submission_form/text_step.vue @@ -89,6 +89,15 @@ export default { } } }, + mounted () { + this.isTextArea = this.modelValue?.includes('\n') + + if (this.isTextArea) { + this.$nextTick(() => { + this.resizeTextarea() + }) + } + }, methods: { resizeTextarea () { const textarea = this.$refs.textarea