optionalSingleChoiceList

fun <T, M : ListModel<T>> optionalSingleChoiceList(model: M, itemVisualizer: ItemVisualizer<T, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<T, M>) -> Unit = {}): FieldVisualizer<T?>(source)

Creates a List control that is bound to a Field. This controls lets a user select a single option from a list. This control lets a user ignore selection entirely, which would result in a null value. This behaves like optionalRadioList.

Parameters

T

is the type of the items in the bounded field

model

for the list

itemVisualizer

used to render items in the list

fitContents

signaling whether the list should scale with its contents

config

used to control the resulting component


fun <T> optionalSingleChoiceList(first: T, vararg rest: T, itemVisualizer: ItemVisualizer<T, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<T, *>) -> Unit = {}): FieldVisualizer<T?>(source)

Creates a List control that is bound to a Field. This controls lets a user select a single option from a list. This control lets a user ignore selection entirely, which would result in a null value. This behaves like optionalRadioList.

Parameters

T

is the type of the items in the bounded field

first

item in the list

rest

of the items in the list

itemVisualizer

used to render items in the list

fitContents

signaling whether the list should scale with its contents

config

used to control the resulting component


fun optionalSingleChoiceList(progression: IntProgression, itemVisualizer: ItemVisualizer<Int, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<Int, *>) -> Unit = {}): FieldVisualizer<Int?>(source)

Creates a List control that is bound to a Field. This controls lets a user select a single option from a list. This control lets a user ignore selection entirely, which would result in a null value. This behaves like optionalRadioList.

Parameters

progression

to use for values

itemVisualizer

used to render items in the list

fitContents

signaling whether the list should scale with its contents

config

used to control the resulting component