themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.31k stars 710 forks source link

Dynamically generated accordions open/close now working #750

Closed padmaJS closed 6 months ago

padmaJS commented 6 months ago

I am using phoenix liveview. I have a log type of system where using handle_info I get new logs and create an accordion for that with unique indexes for creating unique ID for each accordion. but the open/close doesnot work with such. I have to reload ma browser then only the accordion works.

padmaJS commented 6 months ago

turns out the Javascript was not loaded for the newer accordions.

I just added an event listener for phx:update and inside I invoked initAccordions()