From 66464cebc3f6f5707d72f88e45835b4f2c41750b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 30 Jul 2024 10:39:04 -0500 Subject: [PATCH] comment Signed-off-by: Matt Bruce --- .../TextFields/TextViewEntryField.swift | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextViewEntryField.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextViewEntryField.swift index a39e1c97..a76e9451 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextViewEntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextViewEntryField.swift @@ -115,30 +115,6 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT }.store(in: &subscribers) } - open override func updateView() { - super.updateView() - switch viewModel.type { - case .secure, .password: - textView.isSecureTextEntry = true - textView.shouldMaskWhileRecording = true - - case .numberSecure: - textView.isSecureTextEntry = true - textView.keyboardType = .numberPad - textView.shouldMaskWhileRecording = true - - case .number: - textView.keyboardType = .numberPad - - case .email: - textView.keyboardType = .emailAddress -//uncomment out once inputField branch is merged and update this logic -// case .securityCode, .creditCard: -// textView.shouldMaskWhileRecording = true - - default: break - } - } open func viewModelDidUpdate() { text = viewModel.text @@ -171,6 +147,28 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT isEditting = true } + switch viewModel.type { + case .secure, .password: + textView.isSecureTextEntry = true + textView.shouldMaskWhileRecording = true + + case .numberSecure: + textView.isSecureTextEntry = true + textView.keyboardType = .numberPad + textView.shouldMaskWhileRecording = true + + case .number: + textView.keyboardType = .numberPad + + case .email: + textView.keyboardType = .emailAddress +//uncomment out once inputField branch is merged and update this logic +// case .securityCode, .creditCard: +// textView.shouldMaskWhileRecording = true + + default: break + } + /// append any internal rules: viewModel.rules = rules