added isEqual to TextViewEntryFieldModel
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f9915dfacc
commit
e211d4dc22
@ -21,7 +21,7 @@ public class TextViewEntryFieldModel: TextEntryFieldModel {
|
|||||||
public var showsPlaceholder: Bool = false
|
public var showsPlaceholder: Bool = false
|
||||||
public var minHeight: VDS.TextArea.Height = .twoX
|
public var minHeight: VDS.TextArea.Height = .twoX
|
||||||
public var maxLength: Int?
|
public var maxLength: Int?
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -55,4 +55,21 @@ public class TextViewEntryFieldModel: TextEntryFieldModel {
|
|||||||
try container.encode(minHeight, forKey: .minHeight)
|
try container.encode(minHeight, forKey: .minHeight)
|
||||||
try container.encodeIfPresent(maxLength, forKey: .maxLength)
|
try container.encodeIfPresent(maxLength, forKey: .maxLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func isEqual(to model: any ModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isEqual(to: model), let model = model as? Self else { return false }
|
||||||
|
return accessibilityText == model.accessibilityText
|
||||||
|
&& editable == model.editable
|
||||||
|
&& minHeight == model.minHeight
|
||||||
|
&& maxLength == model.maxLength
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func isVisuallyEquivalent(to model: any MoleculeModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isVisuallyEquivalent(to: model), let model = model as? Self else { return false }
|
||||||
|
return accessibilityText == model.accessibilityText
|
||||||
|
&& editable == model.editable
|
||||||
|
&& minHeight == model.minHeight
|
||||||
|
&& maxLength == model.maxLength
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user