From cb3811f4ea5d5aac7b627444857f54c1c4eff7bd Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 10 Jan 2022 13:54:55 -0600 Subject: [PATCH] update readOnly didSet to only effect the FormField only and not title/feedback labels Signed-off-by: Matt Bruce --- .../Atoms/FormFields/TextFields/EntryField.swift | 2 -- .../FormFields/TextFields/TextEntryField.swift | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift index c858fbda..6271c44a 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift @@ -71,8 +71,6 @@ import UIKit get { entryFieldContainer.isReadOnly } set (readOnly) { if(entryFieldContainer.isReadOnly != readOnly){ - titleLabel.isEnabled = !readOnly - feedbackLabel.isEnabled = !readOnly entryFieldContainer.isReadOnly = readOnly entryFieldModel?.readOnly = readOnly } diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryField.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryField.swift index 6c8d8116..cd0adf61 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryField.swift @@ -74,20 +74,6 @@ import UIKit } } - public override var isReadOnly: Bool { - get { super.isReadOnly } - set (readOnly) { - super.isReadOnly = readOnly - - DispatchQueue.main.async { [weak self] in - guard let self = self else { return } - - self.textField.isEnabled = !readOnly - self.textField.textColor = !readOnly ? self.textEntryFieldModel?.enabledTextColor.uiColor : self.textEntryFieldModel?.disabledTextColor.uiColor - } - } - } - public override var showError: Bool { get { super.showError } set (error) {