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() from the 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),
No description
2 Replies
awcodes
awcodes11mo ago
->action(fn() => null)
Ajith Lal
Ajith LalOP11mo ago
Thank you for the reply. I tried the same. but the table is still refreshing after the popup is closed
Want results from more Discord servers?
Add your server