wire-elements/modal

Run JavaScript

Closed this issue · 1 comments

In version 2, if JavaScript or a library needed to be loaded, it worked well.
But in version 3, unfortunately, no JavaScript is executed.
And even the popular media library pro module (medialibrary.pro) is difficult to run and receives a lot of errors. I tried hard to solve the problem, but it is deeper than this and may be related to Livewire version 3 itself.
I suggest if you add a solution to run JavaScript in the modal to version 3, it will be very helpful.

This is related to Livewire v3. Best to report to the Livewire repository to have this resolved.
What you can do is use Alpine, for example, <div x-data x-init="callMyFunction()"></div>.