modal not closing on form submit
I have the below modal, and at the end of my
save()
method, I'm closing the modal, but nothing happens. The close button on the modal itself works without any issue.
<x-filament::modal slide-over id="create-vendor-statement-task" width="xl">
<x-slot name="trigger">
<x-filament::icon-button size="lg" icon="heroicon-o-plus-circle" class="text-mwfNavy-600" style="margin-left: -14px; margin-right: 0px;" />
</x-slot>
<x-slot name="heading">
Create Task
</x-slot>
<form wire:submit="save">
{{ $this->form }}
</form>
<x-slot name="footer">
<x-filament::button type="submit" class="mt-2 " size="sm">
Save
</x-filament::button>
<button type="button" wire:click="$dispatch('close-modal', { id: 'create-vendor-statement-task'} )" class="self-end rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Close</button>
</x-slot>
</x-filament::modal>
<x-filament::modal slide-over id="create-vendor-statement-task" width="xl">
<x-slot name="trigger">
<x-filament::icon-button size="lg" icon="heroicon-o-plus-circle" class="text-mwfNavy-600" style="margin-left: -14px; margin-right: 0px;" />
</x-slot>
<x-slot name="heading">
Create Task
</x-slot>
<form wire:submit="save">
{{ $this->form }}
</form>
<x-slot name="footer">
<x-filament::button type="submit" class="mt-2 " size="sm">
Save
</x-filament::button>
<button type="button" wire:click="$dispatch('close-modal', { id: 'create-vendor-statement-task'} )" class="self-end rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Close</button>
</x-slot>
</x-filament::modal>
$this->dispatch('close-modal', id: 'create-vendor-statement-task');
$this->dispatch('close-modal', id: 'create-vendor-statement-task');
0 Replies