From b907e0e001099d480fabcb714bb5cc5afc2c432b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 29 Feb 2024 12:14:27 -0600 Subject: [PATCH] implemented new internal error handling Signed-off-by: Matt Bruce --- .../TextFields/TextArea/TextArea.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 8e5f8e58..d4f11a9e 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -112,6 +112,7 @@ open class TextArea: EntryFieldBase { get { textView.text } set { textView.text = newValue + value = newValue } } @@ -227,7 +228,7 @@ open class TextArea: EntryFieldBase { bottomStackView.addArrangedSubview(characterCounterLabel) return bottomView } - + /// Used to update any Accessibility properties. open override func updateAccessibility() { super.updateAccessibility() @@ -246,12 +247,13 @@ open class TextArea: EntryFieldBase { let countStr = (count > maxLength ?? 0) ? ("-" + "\(count-(maxLength ?? 0))") : "\(count)" if ((maxLength ?? 0) > 0) { if (count > (maxLength ?? 0)) { - showError = true - errorText = "You have exceeded the character limit." + showInternalError = true + internalErrorText = "You have exceeded the character limit." return countStr } else { - showError = false - errorText = nil + + showInternalError = false + internalErrorText = nil return ("\(countStr)" + "/" + "\(maxLength ?? 0)") } } else { @@ -303,7 +305,7 @@ extension TextArea: UITextViewDelegate { highlightCharacterOverflow() //setting the value and firing control event - value = textView.text + text = textView.text sendActions(for: .valueChanged) } else { textView.text.removeLast() @@ -311,7 +313,7 @@ extension TextArea: UITextViewDelegate { } } else { //setting the value and firing control event - value = textView.text + text = textView.text sendActions(for: .valueChanged) } }