From 5104ee4ecac73fb23974486f4296259e49b57e6a Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 9 May 2023 11:00:55 -0400 Subject: [PATCH] WIP update maxLength. --- .../textarea-question/textarea-question.vue | 4 ++-- src/layouts/customer-details/customer-details.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/digital-components/textarea-question/textarea-question.vue b/src/digital-components/textarea-question/textarea-question.vue index 412cffa19..fb0e90e02 100644 --- a/src/digital-components/textarea-question/textarea-question.vue +++ b/src/digital-components/textarea-question/textarea-question.vue @@ -28,12 +28,12 @@ export default { mounted: function () { const my_textarea = document.getElementById("textarea-comments"); const remaining = document.getElementById("charactersremaining"); - const remain = 250; + const remain = this.maxLength; my_textarea.addEventListener("input", () => { const total = remain - my_textarea.value.length; const color = total < remain * 0.1 ? "red" : null; //Change text to red when the total remaining goes below 25; - remaining.innerHTML = `${total}/250 characters remaining`; + remaining.innerHTML = `${total}/${this.maxLength} characters remaining`; remaining.style.color = color; }); }, diff --git a/src/layouts/customer-details/customer-details.vue b/src/layouts/customer-details/customer-details.vue index a23918284..03aadfacb 100644 --- a/src/layouts/customer-details/customer-details.vue +++ b/src/layouts/customer-details/customer-details.vue @@ -2,7 +2,7 @@