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