fixing reuse error in setWithModel
This commit is contained in:
parent
11aaedfa6b
commit
3eb97d65c9
@ -249,11 +249,16 @@ import UIKit
|
|||||||
entryFieldContainer.setWithModel(model, delegateObject, additionalData)
|
entryFieldContainer.setWithModel(model, delegateObject, additionalData)
|
||||||
|
|
||||||
title = model.title
|
title = model.title
|
||||||
isEnabled = model.isEnabled
|
|
||||||
feedback = model.feedback
|
feedback = model.feedback
|
||||||
errorMessage = model.errorMessage
|
errorMessage = model.errorMessage
|
||||||
isLocked = model.isLocked
|
isEnabled = model.isEnabled
|
||||||
isSelected = model.isSelected
|
|
||||||
|
if let isLocked = model.isLocked {
|
||||||
|
self.isLocked = isLocked
|
||||||
|
|
||||||
|
} else if let isSelected = model.isSelected{
|
||||||
|
self.isSelected = isSelected
|
||||||
|
}
|
||||||
|
|
||||||
if let fieldKey = model.fieldKey {
|
if let fieldKey = model.fieldKey {
|
||||||
self.fieldKey = fieldKey
|
self.fieldKey = fieldKey
|
||||||
|
|||||||
@ -24,8 +24,8 @@ import Foundation
|
|||||||
public var feedback: String?
|
public var feedback: String?
|
||||||
public var errorMessage: String = ""
|
public var errorMessage: String = ""
|
||||||
public var isEnabled: Bool = true
|
public var isEnabled: Bool = true
|
||||||
public var isLocked: Bool = false
|
public var isLocked: Bool?
|
||||||
public var isSelected: Bool = false
|
public var isSelected: Bool?
|
||||||
public var fieldKey: String?
|
public var fieldKey: String?
|
||||||
public var isValid: Bool?
|
public var isValid: Bool?
|
||||||
public var isRequired: Bool?
|
public var isRequired: Bool?
|
||||||
@ -60,8 +60,8 @@ import Foundation
|
|||||||
feedback = try typeContainer.decodeIfPresent(String.self, forKey: .feedback)
|
feedback = try typeContainer.decodeIfPresent(String.self, forKey: .feedback)
|
||||||
errorMessage = try typeContainer.decodeIfPresent(String.self, forKey: .errorMessage) ?? ""
|
errorMessage = try typeContainer.decodeIfPresent(String.self, forKey: .errorMessage) ?? ""
|
||||||
isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled) ?? true
|
isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled) ?? true
|
||||||
isLocked = try typeContainer.decodeIfPresent(Bool.self, forKey: .isLocked) ?? false
|
isLocked = try typeContainer.decodeIfPresent(Bool.self, forKey: .isLocked)
|
||||||
isSelected = try typeContainer.decodeIfPresent(Bool.self, forKey: .isSelected) ?? false
|
isSelected = try typeContainer.decodeIfPresent(Bool.self, forKey: .isSelected)
|
||||||
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
|
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
|
||||||
isValid = try typeContainer.decodeIfPresent(Bool.self, forKey: .isValid)
|
isValid = try typeContainer.decodeIfPresent(Bool.self, forKey: .isValid)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user