phoenixframework / phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
https://hex.pm/packages/phoenix_live_view
MIT License
6.23k stars 934 forks source link

Add a note to the JS hide/1 and show/1 functions for clarifying targeted elements #3510

Closed augusto1024 closed 6 days ago

augusto1024 commented 1 week ago

When using hide and show functions, I noticed that elements that weren't visible to the users weren't being hidden by adding the display: none style.

After looking at the JS code, I saw that the corresponding js functions check if the element is visible or not before applying the style. IMO this is not trivial and should be added to the documentation.

SteffenDE commented 6 days ago

Thank you! 🙌🏻