open drop down model initializer for local building.

This commit is contained in:
Kyle Hedden 2023-05-08 18:39:04 -04:00
parent 0f8c839738
commit 73d5018cc2
2 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,10 @@
case action
}
public override init(with text: String) {
super.init(with: text)
}
open override func setDefaults() {
super.setDefaults()
enableClipboardActions = false

View File

@ -16,6 +16,12 @@
public var options: [String] = []
public var selectedIndex: Int?
public init(with options: [String], selectedIndex: Int? = nil) {
self.options = options
self.selectedIndex = selectedIndex
super.init(with: options.first ?? "")
}
//--------------------------------------------------
// MARK: - Validation
//--------------------------------------------------