Modal component not work in Livewire #416
Unanswered
tegarmonster
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi, Did you manage to solve the problem? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering why, Modal Component works for the first load if using Livewire,
I was adding this script on app.js file
`import 'preline';
document.addEventListener('livewire:navigate', () => {
HSStaticMethods.autoInit();
});
document.addEventListener('livewire:navigating', () => {
HSStaticMethods.autoInit();
});
document.addEventListener('livewire:navigated', () => {
HSStaticMethods.autoInit();
});
`
also include this script into main blade component
``
@Vite(['resources/css/app.css', 'resources/js/app.js'])
but the Javascript cannot load if I move to another page or navigate.. any ideas?
Beta Was this translation helpful? Give feedback.
All reactions