The big picture of what I'm trying to do
Setting an onBlur event on an input to perform single field validation and give feedback to a user as early as possible is considered good UX. Unfortunately, currently, Text style variation msg does not allow setting onBlur attribute.
For now, the simples approach seems to add optional onBlur:
type alias Text style variation msg =
{ onChange : String -> msg
+ , onBlur: Maybe (String -> msg)
, value : String
, label : Label style variation msg
, options : List (Option style variation msg)
}
If this is ok I can create a PR.
Versions
The big picture of what I'm trying to do
Setting an
onBlurevent on an input to perform single field validation and give feedback to a user as early as possible is considered good UX. Unfortunately, currently,Text style variation msgdoes not allow settingonBlurattribute.For now, the simples approach seems to add optional
onBlur:type alias Text style variation msg = { onChange : String -> msg + , onBlur: Maybe (String -> msg) , value : String , label : Label style variation msg , options : List (Option style variation msg) }If this is ok I can create a PR.
Versions