Big Number input.
This is a number input for big number values that can't be stored using Int
and uses String
instead.
input : Options msg -> List (Html.Attribute msg) -> String -> Html msg
View function
Example:
type Msg = InputUpdated String | FocusUpdated Bool
Input.Number.input
{ onInput = InputUpdated
, maxLength = Nothing
, maxValue = 1000
, minValue = 10
, hasFocus = Just FocusUpdated
}
[ class "numberInput"
...
]
model.currentValue
{ maxLength : Maybe Basics.Int
, onInput : String -> msg
, hasFocus : Maybe (Basics.Bool -> msg)
}
Options of the input component.
maxLength
is the maximum number of character allowed in this input. Set to Nothing
for no limit.onInput
is the Msg tagger for the onInput event.hasFocus
is an optional Msg tagger for onFocus/onBlur event.defaultOptions : (String -> msg) -> Options msg
Default value for Options
.
Params:
onInput
(type: String -> msg
) : The onInput Msg taggerValue:
{ onInput = onInput
, maxLength = Nothing
, hasFocus = Nothing
}