© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Ajith Lal

Add modal to custom action button without action called

My project is running on filament v2. I'm using custom pages and a livewire table to show the records. I want to show a modal when clicking a custom action button. I can achieve this using the code below, but the problem is that if I remove the
action()
action()
from the
Action
Action
class, the modal will not work. In addition to that, When I close the modal, the table will refresh and I don't want the buttons on the footer. How do I achieve the same?
Action::make('View Error')
            ->icon('heroicon-o-document-text')
            ->action(
                function (Entity $record): void {
                }
            )
            ->modalHeading(fn (Entity $record) =>"An error occured while processing the order for: {$record->reference}")
            ->modalContent(fn (Entity $record) => view('livewire.orders.error-modal', ['record' => $record]))
            ->modalButton(false),
Action::make('View Error')
            ->icon('heroicon-o-document-text')
            ->action(
                function (Entity $record): void {
                }
            )
            ->modalHeading(fn (Entity $record) =>"An error occured while processing the order for: {$record->reference}")
            ->modalContent(fn (Entity $record) => view('livewire.orders.error-modal', ['record' => $record]))
            ->modalButton(false),
image.png
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

How to add custom action button on edit modal form
FilamentFFilament / ❓┊help
15mo ago
ADD a Action Button in Modal
FilamentFFilament / ❓┊help
3y ago
How to add modal button action in renderHook ?
FilamentFFilament / ❓┊help
3y ago
Custom action modal
FilamentFFilament / ❓┊help
2y ago