TomSelectInput

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

The basic component for a select control based on Tom Select.

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)

maxOptions

the number of visible options

tsOptions

Tom Select options

tsCallbacks

Tom Select callbacks

tsRenders

Tom Select render functions

className

CSS class names

init

an initializer extension function

Constructors

Link copied to clipboard
constructor(options: List<<Error class: unknown class>>? = null, value: String? = null, emptyOption: Boolean = false, multiple: Boolean = false, maxOptions: Int? = null, tsOptions: TomSelectOptions? = null, tsCallbacks: TomSelectCallbacks? = null, tsRenders: TomSelectRenders? = null, className: String? = null, init: TomSelectInput.() -> Unit? = null)

Properties

Link copied to clipboard

Determines if the text input is automatically focused.

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

Determines if the field is disabled.

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

Disable searching in options.

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

Determines if an empty option is automatically generated.

Link copied to clipboard

The number of visible options.

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

Determines if multiple value selection is allowed.

Link copied to clipboard
open var name: String?

The name attribute of the generated HTML input element.

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

A static list of options for a typeahead control

Link copied to clipboard

The placeholder for the input element.

Link copied to clipboard

The label of the currently selected option.

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

The size of the input.

Link copied to clipboard

The native TomSelect object instance

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 validationStatus: <Error class: unknown class>?

The validation status of the input.

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

Text input value.

Functions

Link copied to clipboard
open fun afterDestroy()
Link copied to clipboard
open fun afterInsert(node: <Error class: unknown class>)
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun clearOptions()

Removes all unselected options from the control.

Link copied to clipboard
open fun getState(): String?
Link copied to clipboard
open fun refresh()
Link copied to clipboard
open fun refreshState()
Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard
open fun setState(state: String?)
Link copied to clipboard
open fun subscribe(observer: (String?) -> Unit): () -> Unit