Select

open class Select(options: List<<ERROR CLASS>>?, value: String?, name: String?, multiple: Boolean, ajaxOptions: AjaxOptions?, label: String?, rich: Boolean, init: Select.() -> Unit?)

The form field component for Select control.

The select control can be populated directly from options parameter or manually by adding SelectOption or SelectOptGroup components to the container.

Parameters

options

an optional list of options (value to label pairs) for the select control

value

selected value

name

the name attribute of the generated HTML input element

multiple

allows multiple value selection (multiple values are comma delimited)

ajaxOptions

additional options for remote (AJAX) data source

label

label text bound to the input element

rich

determines if label can contain HTML code

init

an initializer extension function

Constructors

Select
Link copied to clipboard
fun Select(options: List<<ERROR CLASS>>? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false, init: Select.() -> Unit? = null)

Types

Companion
Link copied to clipboard
object Companion

Functions

add
Link copied to clipboard
open fun add(child: <ERROR CLASS>): Select
open fun add(position: Int, child: <ERROR CLASS>): Select
addAll
Link copied to clipboard
open fun addAll(children: List<<ERROR CLASS>>): Select
blur
Link copied to clipboard
open fun blur()
buildClassSet
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <ERROR CLASS>)
disposeAll
Link copied to clipboard
open fun disposeAll(): Select
focus
Link copied to clipboard
open fun focus()
getChildren
Link copied to clipboard
open fun getChildren(): List<<ERROR CLASS>>
getState
Link copied to clipboard
open fun getState(): String?
hideOptions
Link copied to clipboard
open fun hideOptions()

Hides dropdown with options.

remove
Link copied to clipboard
open fun remove(child: <ERROR CLASS>): Select
removeAll
Link copied to clipboard
open fun removeAll(): Select
removeAt
Link copied to clipboard
open fun removeAt(position: Int): Select
removeEventListener
Link copied to clipboard
open fun removeEventListener(id: Int): <ERROR CLASS>
removeEventListeners
Link copied to clipboard
open fun removeEventListeners(): <ERROR CLASS>
setEventListener
Link copied to clipboard
open fun <T> setEventListener(block: <ERROR CLASS><T>.() -> Unit): Int
setState
Link copied to clipboard
open fun setState(state: String?)
showOptions
Link copied to clipboard
open fun showOptions()

Opens dropdown with options.

subscribe
Link copied to clipboard
open fun subscribe(observer: (String?) -> Unit): () -> Unit
toggleOptions
Link copied to clipboard
open fun toggleOptions()

Toggles visibility of dropdown with options.

Properties

ajaxOptions
Link copied to clipboard
var ajaxOptions: <ERROR CLASS>

Additional options for remote (AJAX) data source.

autofocus
Link copied to clipboard
var autofocus: Boolean?

Determines if the select is automatically focused.

dropdownAlign
Link copied to clipboard
var dropdownAlign: <ERROR CLASS>

The dropdown align of the select control.

emptyOption
Link copied to clipboard
var emptyOption: <ERROR CLASS>

Determines if an empty option is automatically generated.

flabel
Link copied to clipboard
val flabel: <ERROR CLASS>
input
Link copied to clipboard
val input: SelectInput
invalidFeedback
Link copied to clipboard
val invalidFeedback: <ERROR CLASS>
label
Link copied to clipboard
var label: <ERROR CLASS>

The label text bound to the select element.

liveSearch
Link copied to clipboard
var liveSearch: <ERROR CLASS>

Determines if live search is available.

maxOptions
Link copied to clipboard
var maxOptions: Int?

Maximal number of selected options.

multiple
Link copied to clipboard
var multiple: <ERROR CLASS>

Determines if multiple value selection is allowed.

options
Link copied to clipboard
var options: <ERROR CLASS>

A list of options (value to label pairs) for the select control.

placeholder
Link copied to clipboard
var placeholder: String?

The placeholder for the select control.

rich
Link copied to clipboard
var rich: <ERROR CLASS>

Determines if label can contain HTML code.

selectedIndex
Link copied to clipboard
var selectedIndex: Int

The index of the currently selected option or -1 if none.

selectedLabel
Link copied to clipboard
var selectedLabel: String?

The label of the currently selected option.

selectWidth
Link copied to clipboard
var selectWidth: <ERROR CLASS>?

The width of the select control.

selectWidthType
Link copied to clipboard
var selectWidthType: SelectWidthType?

The width type of the select control.

style
Link copied to clipboard
var style: <ERROR CLASS>?

The style of the select control.

value
Link copied to clipboard
open var value: <ERROR CLASS>

A value of the selected option.

Extensions

selectOptGroup
Link copied to clipboard
fun Select.selectOptGroup(label: String, options: List<<ERROR CLASS>>? = null, maxOptions: Int? = null, disabled: Boolean = false, className: String? = null, init: SelectOptGroup.() -> Unit? = null): SelectOptGroup

DSL builder extension function.

selectOption
Link copied to clipboard
fun Select.selectOption(value: String? = null, label: String? = null, subtext: String? = null, icon: String? = null, divider: Boolean = false, disabled: Boolean = false, selected: Boolean = false, className: String? = null, init: SelectOption.() -> Unit? = null): SelectOption

DSL builder extension function.