Try Install Learn Blog API Packages GitHub
Pages
mint-ui

Search
Basic information
Entities
Versions
Dependencies
mint-color 0.9.0 <= v < 1.0.0

Ui.InteractiveList

A vertical list the user can interact with using the keyboard.

States

intended
:
String
=
""

The current intended element.

Properties

intendable
:
Bool
=
false

Whether or not the user can intend to select an element.

interactive
:
Bool
=
true

Whether or not the list is interactive.

items
:
Array(Ui.ListItem)
=
[]

The items to render.

onClickSelect
:
Function(String, Promise(Void))
=
Promise.never1

The select event handler (when an item is clicked).

onSelect
:
Function(String, Promise(Void))
=
Promise.never1

The select event handler.

selected
:
Set(String)
=
Set.empty()

The selected set of items.

size
:
Ui.Size
=
Ui.Size::Inherit

The size of the list.

Functions

Intend the first element when the component is mounted.

handleClickSelect
(
value
:
String
)

Handles a select event (when the item is clicked).

handleKeyDown
(
event
:
Html.Event
)

Handles the keydown event.

handleSelect
(
value
:
String
)

Handles a select event.

intend
(
value
:
String
)

Sets the intended element.

render
:
Html

Renders the list.

selectNext
(
forward
:
Bool
)
:
Promise(Void)

Selects the next or previous element.