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

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

Link copied to clipboard
object Companion

Functions

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

Hides dropdown with options.

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

Opens dropdown with options.

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

Toggles visibility of dropdown with options.

Properties

Link copied to clipboard
var ajaxOptions: <ERROR CLASS>

Additional options for remote (AJAX) data source.

Link copied to clipboard
var autofocus: Boolean?

Determines if the select is automatically focused.

Link copied to clipboard
var dropdownAlign: <ERROR CLASS>

The dropdown align of the select control.

Link copied to clipboard
var emptyOption: <ERROR CLASS>

Determines if an empty option is automatically generated.

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

The label text bound to the select element.

Link copied to clipboard
var liveSearch: <ERROR CLASS>

Determines if live search is available.

Link copied to clipboard
var maxOptions: Int?

Maximal number of selected options.

Link copied to clipboard
var multiple: <ERROR CLASS>

Determines if multiple value selection is allowed.

Link copied to clipboard
var options: <ERROR CLASS>

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

Link copied to clipboard
var placeholder: String?

The placeholder for the select control.

Link copied to clipboard
var rich: <ERROR CLASS>

Determines if label can contain HTML code.

Link copied to clipboard
var selectedIndex: Int

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

Link copied to clipboard
var selectedLabel: String?

The label of the currently selected option.

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

The width of the select control.

Link copied to clipboard
var selectWidthType: SelectWidthType?

The width type of the select control.

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

The style of the select control.

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

A value of the selected option.

Extensions

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.

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.