Skip to content

Input can't have onBlur event #148

Description

@andrejsm

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

  • style-elements: 4.3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions