SelectTwo Types
{ defaults : List (SelectTwoOption msg)
, id_ : String
, list : List (GroupSelectTwoOption msg)
, clearMsg : Maybe (Maybe msg -> msg)
, showSearch : Basics.Bool
, width : String
, placeholder : String
, disabled : Basics.Bool
, multiSelect : Basics.Bool
, noResultsMessage : Maybe String
, ajax : Basics.Bool
, delay : Basics.Float
, closeOnClear : Basics.Bool
}
Config for SelectTwo used when initializing your select2 box
Command Messages for SelectTwo
{ model | selectTwo : Maybe (SelectTwo msg) }
Model structure needed for selectTwo, all records using selectTwo should have this structure
{ dropdown : SelectTwoDropdown msg
, hovered : Maybe msg
, search : Maybe String
, list : List (GroupSelectTwoOption msg)
, ajax : Basics.Bool
, id_ : String
, ajaxParams : Maybe AjaxParams
}
Structure created in users model when select2 is activated
{ id_ : String
, defaults : List (SelectTwoOption msg)
, list : List (GroupSelectTwoOption msg)
, showSearch : Basics.Bool
, x : Basics.Float
, y : Basics.Float
, width : Basics.Float
, ajax : Basics.Bool
, delay : Basics.Float
, noResultsMessage : Maybe String
}
Data to generate the dropdown
( String
, List (SelectTwoOption msg)
)
Grouped SelectTwoOption, first option in the tuple is the name of the group
( Maybe msg
, String
, Basics.Bool
)
Rows in a select table, first option is the command message to be sent, second is the html to be displayed and the string to search on, and the third is if it is disabled or not
{ page : Basics.Int
, term : String
, more : Basics.Bool
, loading : Basics.Bool
}
Parameters used in ajax calls
{ scrollHeight : Basics.Int
, scrollTop : Basics.Int
}