You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
style-elements: 4.3.0
The text was updated successfully, but these errors were encountered:
Thanks, @DUBERT, but unfortunately, that's not what I need. onBlur must be of type String -> msg.
But luckily I stumbled upon on. Didn't see that initially.
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 settingonBlur
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 text was updated successfully, but these errors were encountered: