SelectInput

open class SelectInput(options: List<<ERROR CLASS>>?, value: String?, multiple: Boolean, ajaxOptions: AjaxOptions?, className: String?, init: SelectInput.() -> Unit?)

The basic 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

multiple

allows multiple value selection (multiple values are comma delimited)

ajaxOptions

additional options for remote (AJAX) data source

className

CSS class names

init

an initializer extension function

Constructors

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

Types

Companion
Link copied to clipboard
object Companion

Functions

add
Link copied to clipboard
open fun add(child: <ERROR CLASS>): SelectInput
open fun add(position: Int, child: <ERROR CLASS>): SelectInput
addAll
Link copied to clipboard
open fun addAll(children: List<<ERROR CLASS>>): SelectInput
afterDestroy
Link copied to clipboard
open fun afterDestroy()
afterInsert
Link copied to clipboard
open fun afterInsert(node: <ERROR CLASS>)
bindAllJQueryListeners
Link copied to clipboard
open fun bindAllJQueryListeners()
buildAttributeSet
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <ERROR CLASS>)
buildClassSet
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <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>): SelectInput
removeAll
Link copied to clipboard
open fun removeAll(): SelectInput
removeAllJQueryListeners
Link copied to clipboard
open fun removeAllJQueryListeners()
removeAt
Link copied to clipboard
open fun removeAt(position: Int): SelectInput
render
Link copied to clipboard
open fun render(): <ERROR CLASS>
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.

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

Determines if the field is disabled.

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.

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.

name
Link copied to clipboard
open var name: String?

The name attribute of the generated HTML select element.

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.

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.

size
Link copied to clipboard
open var size: <ERROR CLASS>?

The size of the input.

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

The style of the select control.

validationStatus
Link copied to clipboard
open var validationStatus: <ERROR CLASS>?

The validation status of the input.

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

A value of the selected option.

Extensions

selectOptGroup
Link copied to clipboard
fun SelectInput.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 SelectInput.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.