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)
|
||||
|
||||
title = model.title
|
||||
isEnabled = model.isEnabled
|
||||
feedback = model.feedback
|
||||
errorMessage = model.errorMessage
|
||||
isLocked = model.isLocked
|
||||
isSelected = model.isSelected
|
||||
isEnabled = model.isEnabled
|
||||
|
||||
if let isLocked = model.isLocked {
|
||||
self.isLocked = isLocked
|
||||
|
||||
} else if let isSelected = model.isSelected{
|
||||
self.isSelected = isSelected
|
||||
}
|
||||
|
||||
if let fieldKey = model.fieldKey {
|
||||
self.fieldKey = fieldKey
|
||||
|
||||
@ -24,8 +24,8 @@ import Foundation
|
||||
public var feedback: String?
|
||||
public var errorMessage: String = ""
|
||||
public var isEnabled: Bool = true
|
||||
public var isLocked: Bool = false
|
||||
public var isSelected: Bool = false
|
||||
public var isLocked: Bool?
|
||||
public var isSelected: Bool?
|
||||
public var fieldKey: String?
|
||||
public var isValid: Bool?
|
||||
public var isRequired: Bool?
|
||||
@ -60,8 +60,8 @@ import Foundation
|
||||
feedback = try typeContainer.decodeIfPresent(String.self, forKey: .feedback)
|
||||
errorMessage = try typeContainer.decodeIfPresent(String.self, forKey: .errorMessage) ?? ""
|
||||
isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled) ?? true
|
||||
isLocked = try typeContainer.decodeIfPresent(Bool.self, forKey: .isLocked) ?? false
|
||||
isSelected = try typeContainer.decodeIfPresent(Bool.self, forKey: .isSelected) ?? false
|
||||
isLocked = try typeContainer.decodeIfPresent(Bool.self, forKey: .isLocked)
|
||||
isSelected = try typeContainer.decodeIfPresent(Bool.self, forKey: .isSelected)
|
||||
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
|
||||
isValid = try typeContainer.decodeIfPresent(Bool.self, forKey: .isValid)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user