TypeaheadRemote

open class TypeaheadRemote<T : Any>(serviceManager: <ERROR CLASS><T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: () -> String?, items: Int?, minLength: Int, delay: Int, type: <ERROR CLASS>, value: String?, name: String?, label: String?, rich: Boolean, floating: Boolean, init: TypeaheadRemote<T>.() -> Unit?)

Form field typeahead component connected to the fullstack service.

Parameters

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

items

the max number of items to display in the dropdown

minLength

the minimum character length needed before triggering dropdown

delay

a delay between lookups

type

text input type (default "text")

value

text input value

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

floating

use floating label

init

an initializer extension function

Constructors

Link copied to clipboard
fun <T : Any> TypeaheadRemote(serviceManager: <ERROR CLASS><T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: () -> String? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: <ERROR CLASS> = TextInputType.TEXT, value: String? = null, name: String? = null, label: String? = null, rich: Boolean = false, floating: Boolean = false, init: TypeaheadRemote<T>.() -> Unit? = null)

Properties

Link copied to clipboard
var autocomplete: <ERROR CLASS>

Determines if autocomplete is enabled for the input element.

Link copied to clipboard
var autoSelect: <ERROR CLASS>

Determines if the first suggestion is selected automatically.

Link copied to clipboard
var delay: <ERROR CLASS>

A delay between lookups.

Link copied to clipboard
var fitToElement: <ERROR CLASS>

Determines if the menu is the same size as the input it is attached to.

Link copied to clipboard
val input: TypeaheadRemoteInput<T>
Link copied to clipboard
var items: <ERROR CLASS>

The max number of items to display in the dropdown

Link copied to clipboard
var minLength: <ERROR CLASS>

The minimum character length needed before triggering dropdown

Link copied to clipboard
var showHintOnFocus: <ERROR CLASS>

Determines if hints should be shown as soon as the input gets focus.

Link copied to clipboard
var type: <ERROR CLASS>

Text input type.