After trying some stuff, I ended up using setTimeout which works.
Livewire 3 Event After DOM Changes Are Applied
Hello!
I've recently started to learn Laravel and I am trying to build something using Laravel and Livewire.
I have a Livewire component where I render some $assets from the database based on some filters.
Everything works fine except the design. I use a template that runs several JS functions to control the styling. When I change the search criteria and Livewire fetches new $assets from the server, those JS functions are not called and my design is messed up.
Using wire:ignore doesn't help because the elements I need to style are part of the fetched content (e.g. the image container of the asset) so it can't be ignored because it would no longer change.
Using hooks and events didn't help either because everything I tried was executed before the DOM changes were applied and everything I did was useless.
What am I missing? How can I achieve this?
Thank you!
PS: Dropping the template/Stop making use of those JS functions to style is not an option
Please or to participate in this conversation.