Closing a Modal with $dispatch('closeModal') can't re open modal from $dispatch('openModal', { component: 'my-component' })
Closed this issue · 1 comments
audetcameron commented
Hi there,
I have a button to open a modal component,
when clicking the X to dispatch closeModal, if I try to click the button and re open the modal it doesn't work
note, it works well if I click "off the modal" to close it, but triggering the closeModal dispatch throws an error on the next click to re open it livewire.js?id=cc800bf4:4609 Uncaught Component not found: honbBCtMTW60xkem6uZg
Looks like it may completely destroy the modal? Is there a key I need to pass to create a new modal each time?
Thanks
audetcameron commented
I'm silly.
This was on, please ignore this ticket :)
public static function destroyOnClose(): bool
{
return true;
}