open drop down model initializer for local building.
This commit is contained in:
parent
0f8c839738
commit
73d5018cc2
@ -26,6 +26,10 @@
|
||||
case action
|
||||
}
|
||||
|
||||
public override init(with text: String) {
|
||||
super.init(with: text)
|
||||
}
|
||||
|
||||
open override func setDefaults() {
|
||||
super.setDefaults()
|
||||
enableClipboardActions = false
|
||||
|
||||
@ -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
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user