A "select" control that uses auto-complete to assist users.
view : Model -> Props a -> Html (Msg a)
The view for displaying the element.
init : String -> Model
Creates the initial model for the element. id
should be a unique string identifier.
update : Msg a -> Model -> Props a -> SuperSelectResult a
The main function for updating the element in response to Msg
subscriptions : Props a -> Platform.Sub.Sub (Msg a)
subscriptions
As this element requires listening to keyboard events, the subscriptions must be added
to your main function so it may do so. For each instance of this element in your application,
wire up the subscriptions along with the associated Props
you would give to that instance's view
function
defaultProps : Props a
Default properties for the element. The props actually passed in should generally have label
set to
a non-empty string
Messages output from the view
in the Elm runtime. Combine these with update
{ id : String
, textInputData : FormElements.TextInput.Model
, focusedOption : Maybe Basics.Int
, hasFocus : Basics.Bool
}
The model the element uses to render itself.
{ id : String
, options : List (Option a)
, errorText : Maybe String
, helperText : Maybe String
, label : String
, value : Maybe a
, inputValue : String
}
Configurable properties for rendering the view
( String, a )
An "option" for the menu. Each option has a label, and an associated value of whatever type.
ComponentResult Model (Msg a) (ExternalMsg a) Basics.Never
Alias for the element's Component Result type.
The external message type for the Component Result