removed inverted
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
cb30a58db6
commit
226c23abae
@ -21,8 +21,6 @@ open class RadioButtonModel: FormFieldModel {
|
|||||||
public var fieldValue: String?
|
public var fieldValue: String?
|
||||||
|
|
||||||
public var action: ActionModelProtocol?
|
public var action: ActionModelProtocol?
|
||||||
public var inverted: Bool = false
|
|
||||||
public var surface: Surface { inverted ? .dark : .light }
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
@ -32,7 +30,6 @@ open class RadioButtonModel: FormFieldModel {
|
|||||||
case state
|
case state
|
||||||
case fieldValue
|
case fieldValue
|
||||||
case action
|
case action
|
||||||
case inverted
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -77,9 +74,6 @@ open class RadioButtonModel: FormFieldModel {
|
|||||||
baseValue = state
|
baseValue = state
|
||||||
fieldValue = try typeContainer.decodeIfPresent(String.self, forKey: .fieldValue)
|
fieldValue = try typeContainer.decodeIfPresent(String.self, forKey: .fieldValue)
|
||||||
action = try typeContainer.decodeModelIfPresent(codingKey: .action)
|
action = try typeContainer.decodeModelIfPresent(codingKey: .action)
|
||||||
if let inverted = try typeContainer.decodeIfPresent(Bool.self, forKey: .inverted) {
|
|
||||||
self.inverted = inverted
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func encode(to encoder: Encoder) throws {
|
public override func encode(to encoder: Encoder) throws {
|
||||||
@ -88,6 +82,5 @@ open class RadioButtonModel: FormFieldModel {
|
|||||||
try container.encode(state, forKey: .state)
|
try container.encode(state, forKey: .state)
|
||||||
try container.encodeIfPresent(fieldValue, forKey: .fieldValue)
|
try container.encodeIfPresent(fieldValue, forKey: .fieldValue)
|
||||||
try container.encodeModelIfPresent(action, forKey: .action)
|
try container.encodeModelIfPresent(action, forKey: .action)
|
||||||
try container.encodeIfPresent(inverted, forKey: .inverted)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user