Sanjibukai
Having both phx_blur and phx_change applicable?
Hello everybody,
It seems that it’s not possible to have a phx-blur on an input while there’s already a phx-change on the form itself..
Why there’s such a limitation?
I have a use case where I want to display error messages on a form but applicable as soon as a required field is left.
I mean at the beginning there’s no errors displayed.
But when we focus (enter) and then blur (exit) on an input without editing it, it will not trigger the phx-change event.
So that’s why I wanted to have a phx-blur on inputs.
What are your thoughts?
Most Liked
justincjohnson
I created Form errors from a `phx-focus` event are not displayed due to presence of `phx-no-feedback` class · Issue #1166 · phoenixframework/phoenix_live_view · GitHub for my issue, just in case it is related to yours. My current hunch is that the code doesn’t properly handle focus and blur events.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








