optionalDropDown

fun <T : Any, M : ListModel<T>> optionalDropDown(model: M, boxItemVisualizer: ItemVisualizer<T, IndexedItem>, listItemVisualizer: ItemVisualizer<T, IndexedItem> = boxItemVisualizer, unselectedBoxItemVisualizer: ItemVisualizer<Unit, IndexedItem>, unselectedListItemVisualizer: ItemVisualizer<Unit, IndexedItem> = unselectedBoxItemVisualizer, config: (Dropdown<T?, *>) -> Unit = {}): FieldVisualizer<T?>(source)

Creates a Dropdown control that is bound to a Field. This control lets a user select a single item within a list. It is similar to optionalRadioList. This control lets a user ignore selection entirely and therefore the resulting type is T?.

Parameters

T

is the type of the bounded field

model

for the dropdown

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> optionalDropDown(first: T, vararg rest: T, boxItemVisualizer: ItemVisualizer<T, IndexedItem>, listItemVisualizer: ItemVisualizer<T, IndexedItem> = boxItemVisualizer, unselectedBoxItemVisualizer: ItemVisualizer<Unit, IndexedItem>, unselectedListItemVisualizer: ItemVisualizer<Unit, IndexedItem> = unselectedBoxItemVisualizer, config: (Dropdown<T?, *>) -> Unit = {}): FieldVisualizer<T?>(source)

Creates a Dropdown control that is bound to a Field. This control lets a user select a single item within a list. It is similar to optionalRadioList. This control lets a user ignore selection entirely and therefore the resulting type is T?.

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> optionalDropDown(first: T, vararg rest: T, label: (T) -> String = { "$it" }, unselectedLabel: String, config: (Dropdown<T?, *>) -> Unit = {}): FieldVisualizer<T?>(source)

Creates a Dropdown control that is bound to a Field. This control lets a user select a single item within a list. It is similar to optionalRadioList. This control lets a user ignore selection entirely and therefore the resulting type is T?.

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