Creates a List of ChooserItems component.
Represents the component State.
Represents an internal Msg for the component.
Represents a single item which can be selected via ListChooser's api.
Defines the mode in which the list must be shown. It's possible to choose
between the full list of items (viewModeAll) or a limited set of items (viewModePartial).
In this case the number of items to be shown is expressed via itemsPerView.
Creates the configuration of the ListChooser.
...
myConfig : ListChooser.Config
myConfig =
let
itemsPerView =
5
viewAllLabel =
"Show all"
viewPartialLabel =
"Show first " ++ (String.fromInt itemsPerView) ++ " elements"
in
ListChooser.config itemsPerView viewAllLabel viewPartialLabel
...Creates the first instance of a ListChooser.
Updates the State of the component. Used by the parent application to dispatch messages to this component.
Creates a representation of a ChooserItem.
...
myItem : ListChooser.ChooserItem
myItem =
let
slug =
"my_item_slug"
content =
"Lorem ipsum dolor sit amet."
isSelected =
False
in
ListChooser.createItem slug content isSelected
...Retrieves the all ViewMode constructor.
Retrieves the partial ViewMode constructor.
Represents the configuration of the component.