Replies: 3 comments 1 reply
-
|
Do you emit events by any chance when closing the modal? |
Beta Was this translation helpful? Give feedback.
-
|
Seems we do have a listener for the modal (we were having an issue with modals sending events after the user session had expired, well I seem to remember that is why this was added?) <?php
namespace App\Livewire;
use LivewireUI\Modal\ModalComponent as LivewireUIModalComponent;
class ModalComponent extends LivewireUIModalComponent
{
public function boot(): void
{
$this->listeners['modalClosed'] = 'checkUser';
}
public function checkUser()
{
if (! auth()->check()) {
exit;
}
}
} |
Beta Was this translation helpful? Give feedback.
-
|
The error |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm upgrading to Livewire 3 and thought I had everything sorted. I can open modals without any issues however when closing them (either via a button or simply clicking away or hitting escape) I get an error rendered:
Only arrays and Traversables can be unpackedI did see there was a PR about this for destroying modals and properly passing arguments. As this is closing a modal there doesn't appear to be anything I can do directly?
Beta Was this translation helpful? Give feedback.
All reactions