petalframework / petal_components

Phoenix + Live View HEEX Components
https://petal.build/components
MIT License
765 stars 84 forks source link

Accordion sometimes requires a page refresh #323

Open hunterboerner opened 1 week ago

hunterboerner commented 1 week ago

Hi,

I'm using the accordion with js_lib="live_view_js" (for some reason the AlpineJS version was opening the accordions on unrelated events). Sometimes when I navigate to a page with the accordion on it I have to refresh the page before it will allow me to open the accordion. I don't have any other info to debug this. No errors showed up in the console or in the Chrome devtools.

hunterboerner commented 1 week ago

To clarify: the issue with using Alpine JS is that I have a phx-click even on the page and whenever the server handles that event all of the accordions open up on the next render.