© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
toeknee

Prevent Modal Closing?

Within the tables component in a livewire component we have an action, that action renders a form with a view field. The view field renders a button with:

  <button wire:click="downloadAttachment('{{ $invoice_id }}','{{ $file_name }}')">
      <x-heroicon-o-document-arrow-down class="w-4 h-4 text-white-500 inline" /> Download
  </button>
  <button wire:click="downloadAttachment('{{ $invoice_id }}','{{ $file_name }}')">
      <x-heroicon-o-document-arrow-down class="w-4 h-4 text-white-500 inline" /> Download
  </button>


This works well, but on downloading the document the modal / sliderOver is closed. Is there a method we can place in the downloadAttachment function to prevent the modal/slideOver closing?
Solution
Interesting. Maybe you need
type="button"
type="button"
because it otherwise submits your form?
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Prevent Modal from closing on submit.
FilamentFFilament / ❓┊help
8mo ago
Prevent action modal from closing automatically
FilamentFFilament / ❓┊help
3y ago
Prevent Modal from closing on a specific event
FilamentFFilament / ❓┊help
3y ago
Modal closing issue
FilamentFFilament / ❓┊help
2y ago