© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
Jon Mason

Open modal from edit table action

How can I open a modal from the edit action of a table row. I want to have a slide-over where I can edit the record. I have this in my table actions:

->actions([
                Action::make('edit')
                    ->action(fn (StatementTransaction $transaction) => $this->dispatch('open-modal', id: 'edit-transaction')
            ]);
->actions([
                Action::make('edit')
                    ->action(fn (StatementTransaction $transaction) => $this->dispatch('open-modal', id: 'edit-transaction')
            ]);


It doesn't do anything, and I also need to pass a parameter. I have a Livewire component for the edit transaction modal, so I'd ideally like to open that when the row is clicked, unless there's an easier magic way to edit table rows in a modal. Can't seem to find anything in the docs that would allow me to do this, but I feel like it should be possible.

I've also tried:

                Action::make('edit')
                    ->icon('heroicon-m-pencil-square')
                    ->iconButton()
                    ->modalContent(fn (StatementTransaction $transaction): View => view('livewire.components.statements.edit-statement-transaction', ['transaction' => $transaction]))
                    ->slideOver()
                Action::make('edit')
                    ->icon('heroicon-m-pencil-square')
                    ->iconButton()
                    ->modalContent(fn (StatementTransaction $transaction): View => view('livewire.components.statements.edit-statement-transaction', ['transaction' => $transaction]))
                    ->slideOver()
Solution
The last bit of my question seems to be how to do it based on this github discussion:

https://github.com/filamentphp/filament/discussions/7529

but it's not working.
GitHub
How to show livewire component as modal window for filament table a...
I am going to show a livewire component in modal window when user clicks a filament table action. protected function getTableActions() { return [ ActionGroup::make([ ViewAction::make()->form([ T...
How to show livewire component as modal window for filament table a...
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Open Edit modal from Action Group
FilamentFFilament / ❓┊help
2y ago
Action open table in modal
FilamentFFilament / ❓┊help
3y ago
Extra modal actions, trigger edit modal action and open link
FilamentFFilament / ❓┊help
3y ago
Open relation manager create modal from table action
FilamentFFilament / ❓┊help
3y ago