type

ListButton

src @Js
class ListButton : Button

ListButton allows user selection of an item in a list by showing a listbox popup on button press.

See also: docDomkit, Button, ToggleButton

constructors

fields

items

The current list items.

sel

Selection for list.

methods

onElem

Callback to create an Elem representation for a given list item.

onSelect

Callback when selected item has changed.

Slot Details

items

src Obj[] items := Obj#.emptyList

The current list items.

make

src new make()

onElem

src Void onElem(|Obj->Obj| f)

Callback to create an Elem representation for a given list item. If function does not return an Elem instance, one will be created using toStr of value.

onSelect

src Void onSelect(|This| f)

Callback when selected item has changed.

sel

src Selection sel { private set }

Selection for list.