You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside of a Laravel Livewire component, I dispatch an event to a listener containing some Javacript that calls the .hide() method on the modal. Unfortunately, the modal does not close.
Inside of a Laravel Livewire component, I dispatch an event to a listener containing some Javacript that calls the .hide() method on the modal. Unfortunately, the modal does not close.
JS code:
document.addEventListener('livewire:load', () => {
Livewire.on('closeModal', () => {
const myModal = new Modal(document.getElementById('createCustomerModal'));
myModal.hide();
});
});
Livewire Componant:
if ($userOrganization) {
// Establish the parent-child relationship
$userOrganization->children()->attach($organization->id, ['name' => 'some_relation_name']);
}
$this->dispatch('closeModal');
$this->reset();
The text was updated successfully, but these errors were encountered: