TomSelectRemote
constructor(serviceManager: KVServiceMgr<T>, function: suspend T.(String?, String?, String?) -> List<RemoteOption>, stateFunction: () -> String? = null, value: String? = null, emptyOption: Boolean = false, multiple: Boolean = false, maxOptions: Int? = null, tsOptions: TomSelectOptions? = null, tsCallbacks: TomSelectCallbacks? = null, tsRenders: TomSelectRenders? = null, preload: Boolean = false, openOnFocus: Boolean = false, requestFilter: suspend RequestInit.() -> Unit? = null, name: String? = null, label: String? = null, rich: Boolean = false, init: TomSelectRemote<T>.() -> Unit? = null)(source)
Parameters
value
selected value
serviceManager
fullstack service manager
function
fullstack service method returning the list of options
stateFunction
a function to generate the state object passed with the remote request
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
preload
preload all options from remote data source
openOnFocus
open dropdown on input focus
requestFilter
a request filtering function
name
the name attribute of the generated HTML input element
label
label text bound to the input element
rich
determines if label can contain HTML code
init
an initializer extension function