Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: no fork with tag 4.0.0 found (6 same-name repos checked); https://github.com/MadonnaMat/elm-select-two has tag 4.0.0, but not a package Elm could build from it; https://github.com/MadonnaMat/elm-select-two commit dcad29ab1afb630222dcf6f210ed489ba22ef7ad (the tag's commit when Software Heritage visited) has tag 4.0.0, but not a package Elm could build from it; no cached copy. Use another version.
This library is the basic controls for your model's select2 object and some helper methods
#Basic Controls
Create a new instance of the selectTwo record in your model
modify selectTwo record in your model
set the search parameter in your selectTwo record
To be used in your ajax functions to set loading state before sending
TestAjax params reset ->
let
url =
"//api.github.com/search/repositories"
buildUrl =
let
term =
if params.term == "" then
"test"
else
params.term
in
(url ++ "?q=" ++ term ++ "&page=" ++ (toString params.page))
in
SelectTwo.setLoading params reset model ! [ sendAjax buildUrl (TestRes params) ]Set the list from the return of your ajax command
TestRes params (Ok str) ->
let
( list, newParams ) =
processResult Test str params
in
SelectTwo.setList list newParams model ! []turn a list of Tuples into a list of GroupSelectTwoOptions with one group. The first parameter is their shared trigger message, the second parameter is the list of tuples which are formatted as (Key, "Display"), and the return can be used in the list option of the config
[ ( Just "a", "a" )
, ( Just "b", "b" )
, ( Just "c", "c" )
]
|> SelectTwo.basicSelectOptions Testturn a list of Tuples3 into a list of GroupSelectTwoOptions with actual grouping. The first parameter is their shared trigger message, the second parameter is the list of tuples which are formatted as (Key, "Display", "Group Name"), and the return can be used in the list option of the config
[ ( Just "a", "a", "Group 1" )
, ( Just "b", "b", "Group 1" )
, ( Just "c", "c", "Group 2" )
]
|> SelectTwo.basicSelectOptions TestQuick helper way of getting defaults list from a GroupSelectTwoOption list
Quick helper method for sending a message and running through your update function agian
update msg model =
case msg of
Test1 ->
( model
, SelectTwo.send Test2
)
Test2 ->
( model
, Cmd.none
)
used in your elm project's update as a way to control the select two boxes on screen it is used by