update readOnly didSet to only effect the FormField only and not title/feedback labels
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
05674a6798
commit
cb3811f4ea
@ -71,8 +71,6 @@ import UIKit
|
|||||||
get { entryFieldContainer.isReadOnly }
|
get { entryFieldContainer.isReadOnly }
|
||||||
set (readOnly) {
|
set (readOnly) {
|
||||||
if(entryFieldContainer.isReadOnly != readOnly){
|
if(entryFieldContainer.isReadOnly != readOnly){
|
||||||
titleLabel.isEnabled = !readOnly
|
|
||||||
feedbackLabel.isEnabled = !readOnly
|
|
||||||
entryFieldContainer.isReadOnly = readOnly
|
entryFieldContainer.isReadOnly = readOnly
|
||||||
entryFieldModel?.readOnly = readOnly
|
entryFieldModel?.readOnly = readOnly
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 {
|
public override var showError: Bool {
|
||||||
get { super.showError }
|
get { super.showError }
|
||||||
set (error) {
|
set (error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user