added isEqual
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
398bf94811
commit
b70d2f8add
@ -136,6 +136,38 @@ import VDS
|
||||
try container.encode(required, forKey: .required)
|
||||
try container.encode(inverted, forKey: .inverted)
|
||||
}
|
||||
|
||||
open func isEqual(to model: any ModelComparisonProtocol) -> Bool {
|
||||
guard let model = model as? Self else { return false }
|
||||
return moleculeName == model.moleculeName
|
||||
&& enabled == model.enabled
|
||||
&& showError == model.showError
|
||||
&& errorMessage == model.errorMessage
|
||||
&& readOnly == model.readOnly
|
||||
&& required == model.required
|
||||
&& inverted == model.inverted
|
||||
&& fieldKey == model.fieldKey
|
||||
&& groupName == model.groupName
|
||||
&& accessibilityText == model.accessibilityText
|
||||
&& accessibilityIdentifier == model.accessibilityIdentifier
|
||||
&& accessibilityTraits == model.accessibilityTraits
|
||||
}
|
||||
|
||||
open func isVisuallyEquivalent(to model: any MoleculeModelComparisonProtocol) -> Bool {
|
||||
guard let model = model as? Self else { return false }
|
||||
return moleculeName == model.moleculeName
|
||||
&& enabled == model.enabled
|
||||
&& showError == model.showError
|
||||
&& errorMessage == model.errorMessage
|
||||
&& readOnly == model.readOnly
|
||||
&& required == model.required
|
||||
&& inverted == model.inverted
|
||||
&& fieldKey == model.fieldKey
|
||||
&& groupName == model.groupName
|
||||
&& accessibilityText == model.accessibilityText
|
||||
&& accessibilityIdentifier == model.accessibilityIdentifier
|
||||
&& accessibilityTraits == model.accessibilityTraits
|
||||
}
|
||||
}
|
||||
|
||||
extension FormFieldModel {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user