Is there any way to let you close the modal by clicking outside or pressing escape, but only if nothing has changed in the form?
Would be cool to do something like this:
public function closeModalOnEscape():
{
return !$this->post->isDirty();
}
Or let you show another modal saying "You have unsaved changes. Are you sure you want to close the modal?" if the form is dirty.
Any ideas? Thanks!
Is there any way to let you close the modal by clicking outside or pressing escape, but only if nothing has changed in the form?
Would be cool to do something like this:
Or let you show another modal saying "You have unsaved changes. Are you sure you want to close the modal?" if the form is dirty.
Any ideas? Thanks!