An implementation of multiselect control built with and for Elm.
Please, check example/src/MinimalExample.elm for the minimal example on how to use this library.
Get selected values : List (String, String)
Populate model with values : List (String, String) and preselect selected : List (String, String).
Opaque type that holds the model
type alias Model =
{ multiselect : Multiselect.Model
}Opaque type for internal library messages
Transparent type for external library messages
Render the view
Html.map MultiselectMsg <| Multiselect.view model.multiselectUpdate the control state
MultiselectMsg subMsg ->
let
( subModel, subCmd ) =
Multiselect.update subMsg model.multiselect
in
{ model | multiselect = subModel } ! [ Cmd.map MultiselectMsg subCmd ]Subscribe for messages
Sub.map MultiselectMsg <| Multiselect.subscriptions model.multiselect
Init model based on the values : List (String, String) and id : String provided by the user.