dropDown

fun <T, M : ListModel<T>> dropDown(model: M, boxItemVisualizer: ItemVisualizer<T, IndexedItem>, listItemVisualizer: ItemVisualizer<T, IndexedItem> = boxItemVisualizer, config: (SelectBox<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Deprecated

Use selectBox instead

Replace with

selectBox(model, boxItemVisualizer, listItemVisualizer, config)

Creates a SelectBox control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

model

for the select box

boxItemVisualizer

used to render the drop-down's box item

listItemVisualizer

used to render items in the drop-down's list

config

used to control the resulting component


fun <T> dropDown(first: T, vararg rest: T, boxItemVisualizer: ItemVisualizer<T, IndexedItem>, listItemVisualizer: ItemVisualizer<T, IndexedItem> = boxItemVisualizer, config: (SelectBox<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Deprecated

Use selectBox

Replace with

selectBox(first, *rest, boxItemVisualizer = boxItemVisualizer, listItemVisualizer = listItemVisualizer, config = config)

Creates a SelectBox control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

first

item in the list

rest

of the items in the list

boxItemVisualizer

used to render the drop-down's box item

listItemVisualizer

used to render items in the drop-down's list

config

used to control the resulting component


fun <T> dropDown(first: T, vararg rest: T, label: (T) -> String = { "$it" }, config: (SelectBox<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Deprecated

Use selectBox

Replace with

selectBox(first, *rest, label = label, config = config)

Creates a SelectBox control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

first

item in the list

rest

of the items in the list

label

used to render the drop-down's box and list items

config

used to control the resulting component


fun <T : Any> dropDown(first: T, vararg rest: T, boxItemVisualizer: ItemVisualizer<T, IndexedItem>, listItemVisualizer: ItemVisualizer<T, IndexedItem> = boxItemVisualizer, unselectedBoxItemVisualizer: ItemVisualizer<Unit, IndexedItem>, unselectedListItemVisualizer: ItemVisualizer<Unit, IndexedItem> = unselectedBoxItemVisualizer, config: (SelectBox<T?, *>) -> Unit = {}): FieldVisualizer<T>(source)

Deprecated

Use selectBox

Replace with

selectBox( first, *rest, boxItemVisualizer = boxItemVisualizer, listItemVisualizer = listItemVisualizer, unselectedBoxItemVisualizer = unselectedBoxItemVisualizer, unselectedListItemVisualizer = unselectedListItemVisualizer, config = config)

Creates a SelectBox control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, in that it DOES NOT set a default value and its field is Invalid if no initial value is bound to it. The control actually has an "unselected" state when it is invalid.

Parameters

T

is the type of the bounded field

first

item in the list

rest

of the items in the list

boxItemVisualizer

used to render the drop-down's box item

listItemVisualizer

used to render items in the drop-down's list

unselectedBoxItemVisualizer

used to render the drop-down's box item when it is unselected

unselectedListItemVisualizer

used to render the "unselected item" in the drop-down's list

config

used to control the resulting component


fun <T : Any> dropDown(first: T, vararg rest: T, label: (T) -> String = { "$it" }, unselectedLabel: String, config: (SelectBox<T?, *>) -> Unit = {}): FieldVisualizer<T>(source)

Deprecated

Use selectBox

Replace with

selectBox( first, *rest, label = label, unselectedLabel = unselectedLabel, config = config)

Creates a SelectBox control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, in that it DOES NOT set a default value and its field is Invalid if no initial value is bound to it. The control actually has an "unselected" state when it is invalid.

Parameters

T

is the type of the bounded field

first

item in the list

rest

of the items in the list

label

used to render the drop-down's items

unselectedLabel

used to render the item that represents the "unselected" state

config

used to control the resulting component