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
}
open override func setDefaults() {
super.setDefaults()
enableClipboardActions = false
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

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