added isEqual to RadioBox variations
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f94ddbf866
commit
c40dc5e396
@ -31,7 +31,6 @@ public class RadioBoxModel: FormFieldModel {
|
|||||||
case text
|
case text
|
||||||
case subText
|
case subText
|
||||||
case subTextRight
|
case subTextRight
|
||||||
case backgroundColor
|
|
||||||
case selected
|
case selected
|
||||||
case strikethrough
|
case strikethrough
|
||||||
case action
|
case action
|
||||||
@ -90,4 +89,26 @@ public class RadioBoxModel: FormFieldModel {
|
|||||||
try container.encode(strikethrough, forKey: .strikethrough)
|
try container.encode(strikethrough, forKey: .strikethrough)
|
||||||
try container.encodeModelIfPresent(action, forKey: .action)
|
try container.encodeModelIfPresent(action, forKey: .action)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func isEqual(to model: any ModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isEqual(to: model), let model = model as? Self else { return false }
|
||||||
|
return text == model.text
|
||||||
|
&& subText == model.subText
|
||||||
|
&& subTextRight == model.subTextRight
|
||||||
|
&& selected == model.selected
|
||||||
|
&& strikethrough == model.strikethrough
|
||||||
|
&& fieldValue == model.fieldValue
|
||||||
|
&& action.isEqual(to: model.action)
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func isVisuallyEquivalent(to model: any MoleculeModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isVisuallyEquivalent(to: model), let model = model as? Self else { return false }
|
||||||
|
return text == model.text
|
||||||
|
&& subText == model.subText
|
||||||
|
&& subTextRight == model.subTextRight
|
||||||
|
&& selected == model.selected
|
||||||
|
&& strikethrough == model.strikethrough
|
||||||
|
&& fieldValue == model.fieldValue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,6 +69,16 @@ public class RadioBoxesModel: FormFieldModel {
|
|||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encode(boxes, forKey: .boxes)
|
try container.encode(boxes, forKey: .boxes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func isEqual(to model: any ModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isEqual(to: model), let model = model as? Self else { return false }
|
||||||
|
return boxes == model.boxes
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func isVisuallyEquivalent(to model: any MoleculeModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isVisuallyEquivalent(to: model), let model = model as? Self else { return false }
|
||||||
|
return boxes == model.boxes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension Array where Element == RadioBoxModel {
|
extension Array where Element == RadioBoxModel {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user