TomSelect

open class TomSelect(options: List<<Error class: unknown class>>? = null, value: String? = null, emptyOption: Boolean = false, multiple: Boolean = false, selectSize: Int? = null, tsOptions: TomSelectOptions? = null, tsCallbacks: TomSelectCallbacks? = null, tsRenders: TomSelectRenders? = null, label: String? = null, rich: Boolean = false, init: TomSelect.() -> Unit? = null)

The form field component for Tom Select control.

Parameters

options

a static list of options

value

text input value

emptyOption

determines if an empty option is automatically generated

multiple

allows multiple value selection (multiple values are comma delimited)

selectSize

the number of visible options

tsOptions

Tom Select options

tsCallbacks

Tom Select callbacks

tsRenders

Tom Select render functions

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 TomSelect(options: List<<Error class: unknown class>>? = null, value: String? = null, emptyOption: Boolean = false, multiple: Boolean = false, selectSize: Int? = null, tsOptions: TomSelectOptions? = null, tsCallbacks: TomSelectCallbacks? = null, tsRenders: TomSelectRenders? = null, label: String? = null, rich: Boolean = false, init: TomSelect.() -> Unit? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun add(child: <Error class: unknown class>)
open fun add(position: Int, child: <Error class: unknown class>)
Link copied to clipboard
open fun addAll(children: List<<Error class: unknown class>>)
Link copied to clipboard
open fun blur()
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun disposeAll()
Link copied to clipboard
open fun focus()
Link copied to clipboard
open fun getChildren(): List<<Error class: unknown class>>
Link copied to clipboard
open fun getState(): String?
Link copied to clipboard
open fun remove(child: <Error class: unknown class>)
Link copied to clipboard
open fun removeAll()
Link copied to clipboard
open fun removeAt(position: Int)
Link copied to clipboard
open fun removeEventListener(id: Int)
Link copied to clipboard
Link copied to clipboard
open fun <T> setEventListener(block: <Error class: unknown class><T>.() -> Unit): Int
Link copied to clipboard
open fun setState(state: String?)
Link copied to clipboard
open fun subscribe(observer: (String?) -> Unit): () -> Unit

Properties

Link copied to clipboard

Determines if the select is automatically focused.

Link copied to clipboard
var emptyOption: <Error class: unknown class>

Determines if an empty option is automatically generated.

Link copied to clipboard
val flabel: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
val invalidFeedback: <Error class: unknown class>
Link copied to clipboard
var label: <Error class: unknown class>

The label text bound to the select element.

Link copied to clipboard
var multiple: <Error class: unknown class>

Determines if multiple value selection is allowed.

Link copied to clipboard
var options: <Error class: unknown class>

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

Link copied to clipboard

The placeholder for the select control.

Link copied to clipboard
var rich: <Error class: unknown class>

Determines if label can contain HTML code.

Link copied to clipboard

The label of the currently selected option.

Link copied to clipboard

The number of visible options.

Link copied to clipboard
var tsCallbacks: <Error class: unknown class>

Tom Select callbacks

Link copied to clipboard
var tsOptions: <Error class: unknown class>

Tom Select options

Link copied to clipboard
var tsRenders: <Error class: unknown class>

Tom Select render functions

Link copied to clipboard
open var value: <Error class: unknown class>

A value of the selected option.