code review fiixes

This commit is contained in:
Suresh, Kamlesh 2021-01-06 18:51:03 -05:00
parent 9495e3f69c
commit dabad14ed5
2 changed files with 5 additions and 4 deletions

View File

@ -319,7 +319,8 @@ import UIKit
model.updateUIDynamicError = { [weak self] in model.updateUIDynamicError = { [weak self] in
MVMCoreDispatchUtility.performBlock(onMainThread: { MVMCoreDispatchUtility.performBlock(onMainThread: {
guard let self = self else { return } guard let self = self, model.dynamicErrorMessage != nil else { return }
model.isValid = false
self.updateValidation(model.isValid ?? false) self.updateValidation(model.isValid ?? false)
}) })
} }

View File

@ -23,8 +23,7 @@ import Foundation
public var title: String? public var title: String?
public var feedback: String? public var feedback: String?
public var dynamicErrorMessage: String? { public var dynamicErrorMessage: String? {
didSet { didSet {
isValid = false
updateUIDynamicError?() updateUIDynamicError?()
} }
} }
@ -47,7 +46,8 @@ import Foundation
/// Temporary binding mechanism for the view to update on enable changes. /// Temporary binding mechanism for the view to update on enable changes.
public var updateUI: ActionBlock? public var updateUI: ActionBlock?
// TODO: Remove once updateUI is fixed with isSelected
public var updateUIDynamicError: ActionBlock? public var updateUIDynamicError: ActionBlock?
//-------------------------------------------------- //--------------------------------------------------