added setDefaults func

This commit is contained in:
Krishna Kishore Bandaru 2022-12-12 13:33:10 +05:30
parent 4963c311d4
commit e66924dc1f
2 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,11 @@
case action case action
} }
open override func setDefaults() {
super.setDefaults()
enableClipboardActions = false
}
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Codec // MARK: - Codec
//-------------------------------------------------- //--------------------------------------------------

View File

@ -83,6 +83,9 @@ import Foundation
case shouldMaskRecordedView case shouldMaskRecordedView
} }
/// Sets the default values. Should be called on init.
open func setDefaults() { }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Validation Methods // MARK: - Validation Methods
//-------------------------------------------------- //--------------------------------------------------
@ -119,6 +122,7 @@ import Foundation
baseValue = text baseValue = text
self.titleStateLabel = FormLabelModel(text: "") self.titleStateLabel = FormLabelModel(text: "")
self.feedbackStateLabel = FormLabelModel(text: "") self.feedbackStateLabel = FormLabelModel(text: "")
setDefaults()
} }
//-------------------------------------------------- //--------------------------------------------------
@ -157,6 +161,7 @@ import Foundation
self.feedbackStateLabel = FormLabelModel(model: LabelModel(text: feedback ?? "", self.feedbackStateLabel = FormLabelModel(model: LabelModel(text: feedback ?? "",
fontStyle: FormLabelModel.defaultFontStyle, fontStyle: FormLabelModel.defaultFontStyle,
textColor: Color(uiColor: .mvmCoolGray6))) textColor: Color(uiColor: .mvmCoolGray6)))
setDefaults()
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {