PerformanceIMMO/elm-utils/5.3.0

NOTE: the latest version is 5.5.0

Renamed to SquirclesIO/elm-utils. It is published under that name, and new versions come out there.

Versions published as PerformanceIMMO/elm-utils still install under that name. 24 versions of 25 come from the new location (see their notes). 1 version could not be recovered and cannot be installed.

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/SquirclesIO/elm-utils.

What we checked: The repo moved to github.com/SquirclesIO/elm-utils. Rebuilt with git archive from commit e740ff2fb4ee of https://github.com/SquirclesIO/elm-utils (zip prefix PerformanceIMMO-elm-utils-e740ff2/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 442dc72ab0cbfdc2a32ed282760f71597f36e063.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/PerformanceIMMO/elm-utils/zipball/5.3.0/

Perfimmo.Form.FormField.FormMultiSelect

FormMultiSelect

type FormMultiSelect decoration
= FormMultiSelect Model (List (FormFieldInfo decoration))

Multiselect DOM backend element

  • can search a value
  • can select several values
type alias AvailableValues =
List ( String, String )

Values available in the Multiselect

type alias SelectTag =
String

Give a name to the Multiselect

type alias SelectedValues =
List ( String, String )

Values that are selected

AvailableValues
-> SelectTag
-> List (FormFieldInfo decoration)
-> FormMultiSelect decoration

initialize the Multiselect

FormMultiSelect.init [("1", "toto"), ("2", "titi")] "myMultiSelect" [FieldIsMandatory]
SelectedValues
-> FormMultiSelect decoration
-> FormMultiSelect decoration

set several values as selected from availables values in the Multiselect

multiselect = FormMultiSelect.init [("1", "toto"), ("2", "titi")] "myMultiSelect" []
FormMultiSelect.selectValues [("2", "toto")] multiselect
Msg
-> FormMultiSelect decoration
-> ( FormMultiSelect decoration, Cmd Msg, Maybe OutMsg )

update Multiselect with specific event (tagged as Msg). Should be use with Multiselect.view.

multiselect = FormMultiSelect.init [("1", "toto"), ("2", "titi")] "myMultiSelect" []
(newSelect, cmd, out) = FormMultiSelect.update (Multiselect.RemoveItem ("1", "toto")) multiselect
getSelectedValues : FormMultiSelect decoration -> SelectedValues

getSelectedValues

FormFieldInfo decoration
-> FormMultiSelect decoration
-> FormMultiSelect decoration

addInfo

FormFieldInfo decoration
-> FormMultiSelect decoration
-> FormMultiSelect decoration

removeInfo

getInfos : FormMultiSelect decoration -> List (FormFieldInfo decoration)

getInfos

view : FormMultiSelect decoration -> Html Msg

give a Html view of the component

subscriptions : FormMultiSelect decoration -> Sub Msg

Allow the unfocus multiselect DOM Element

getMultiselectModel : FormMultiSelect decoration -> Model

allow to handle Multiselect things that is not handled by FormMultiSelect