Wire:navigate breaks modals
Closed this issue · 3 comments
Hi, thank you for your hard work! I'm having a problem in my app, if i wire:navigate to a page submit modal crud, i get errors like this..
Uncaught ReferenceError: show is not defined
at [Alpine] show && showActiveComponent (eval at safeAsyncFunction (livewire.js?id=2f6e5d4d:1281:21), :3:32)
any help would be appreciated!
Hi,
I had this same issue. I'm not sure if this is the correct approach but I found if I wrapped @persist
around
@livewire('wire-elements-modal')
in the layout file the error went away.
See docs here:
https://livewire.laravel.com/docs/navigate#persisting-elements-across-page-visits
Hi,
I had this same issue. I'm not sure if this is the correct approach but I found if I wrapped
@persist
around
@livewire('wire-elements-modal')
in the layout file the error went away.
See docs here:
https://livewire.laravel.com/docs/navigate#persisting-elements-across-page-visits
Much appreciation to your quick reply, will try now and let you know!
Much love brother, it actually worked.