spinner

fun <T, M : SpinnerModel<T>> spinner(model: M, itemVisualizer: ItemVisualizer<T, Spinner<T, M>> = toString(StringVisualizer()), config: (Spinner<T, M>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a Spinner 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 dropdown

itemVisualizer

used to render the drop-down's box item

config

used to control the resulting component


fun <T> spinner(first: T, vararg rest: T, itemVisualizer: ItemVisualizer<T, Spinner<T, *>>, config: (Spinner<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a Spinner 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

itemVisualizer

used to render the drop-down's box item

config

used to control the resulting component


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

Creates a Spinner 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