Typeahead

open class Typeahead(options: List<String>?, taAjaxOptions: TaAjaxOptions?, source: (String, (Array<String>) -> Unit) -> Unit?, items: Int?, minLength: Int, delay: Int, type: <ERROR CLASS>, value: String?, name: String?, label: String?, rich: Boolean, floating: Boolean, init: Typeahead.() -> Unit?)

Form field typeahead component.

Parameters

options

a static list of options

taAjaxOptions

AJAX options for remote data source

source

source function for data source

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

Typeahead
Link copied to clipboard
fun Typeahead(options: List<String>? = null, taAjaxOptions: TaAjaxOptions? = null, source: (String, (Array<String>) -> Unit) -> Unit? = 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: Typeahead.() -> Unit? = null)

Properties

autocomplete
Link copied to clipboard
var autocomplete: <ERROR CLASS>

Determines if autocomplete is enabled for the input element.

autoSelect
Link copied to clipboard
var autoSelect: <ERROR CLASS>

Determines if the first suggestion is selected automatically.

delay
Link copied to clipboard
var delay: <ERROR CLASS>

A delay between lookups.

fitToElement
Link copied to clipboard
var fitToElement: <ERROR CLASS>

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

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

The max number of items to display in the dropdown

minLength
Link copied to clipboard
var minLength: <ERROR CLASS>

The minimum character length needed before triggering dropdown

options
Link copied to clipboard
var options: <ERROR CLASS>

A static list of options for a typeahead control

showHintOnFocus
Link copied to clipboard
var showHintOnFocus: <ERROR CLASS>

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

source
Link copied to clipboard
var source: <ERROR CLASS>

Source function for data source

taAjaxOptions
Link copied to clipboard
var taAjaxOptions: <ERROR CLASS>

AJAX options for remote data source

type
Link copied to clipboard
var type: <ERROR CLASS>

Text input type.