Typeahead Remote Input
open class TypeaheadRemoteInput<out T : Any>(serviceManager: <Error class: unknown class><T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: () -> String? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: <Error class: unknown class> = InputType.TEXT, value: String? = null, taAjaxOptions: <Error class: unknown class>? = null, className: String? = null, init: TypeaheadRemoteInput<T>.() -> Unit? = null)
Deprecated
Use TomTypeaheadRemoteInput instead from the kvision-tom-select-remote module. The library that this component is based on is no longer maintained and this module will be removed in KVision 6.
The Typeahead control connected to the fullstack service.
Parameters
service Manager
fullstack service manager
function
fullstack service method returning the list of options
state Function
a function to generate the state object passed with the remote request
items
the max number of items to display in the dropdown
min Length
the minimum character length needed before triggering dropdown
delay
a delay between lookups
type
text input type (default "text")
value
text input value
ta Ajax Options
AJAX options for remote data source
class Name
CSS class names
init
an initializer extension function
Constructors
Link copied to clipboard
fun <out T : Any> TypeaheadRemoteInput(serviceManager: <Error class: unknown class><T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: () -> String? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: <Error class: unknown class> = InputType.TEXT, value: String? = null, taAjaxOptions: <Error class: unknown class>? = null, className: String? = null, init: TypeaheadRemoteInput<T>.() -> Unit? = null)