diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form/SelectInput.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/form/SelectInput.kt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/SelectInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/SelectInput.kt index 68c3b57d..7cacd422 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/SelectInput.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/SelectInput.kt @@ -16,7 +16,7 @@ enum class SELECTWIDTHTYPE(val value: String) { FIT("fit") } -class SelectInput(options: List<StringPair>? = null, value: String? = null, +open class SelectInput(options: List<StringPair>? = null, value: String? = null, multiple: Boolean = false, classes: Set<String> = setOf()) : SimplePanel(classes), StringFormField { internal var options = options @@ -169,6 +169,18 @@ class SelectInput(options: List<StringPair>? = null, value: String? = null, this.refreshSelectInput() } + open fun showOptions() { + getElementJQueryD()?.selectpicker("show") + } + + open fun hideOptions() { + getElementJQueryD()?.selectpicker("hide") + } + + open fun toggleOptions() { + getElementJQueryD()?.selectpicker("toggle") + } + override fun getSnClass(): List<StringBoolPair> { val cl = super.getSnClass().toMutableList() cl.add("selectpicker" to true) |