© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•10mo ago•
14 replies
kirakatou

add action to group header table

im trying to add delete action button to group header at table but its not working, it only do quick spin and then back to normal state.

what i do to render the action button is make function in ListRecord
    public function renderGroupDeleteAction($id)
    {
        return Actions\Action::make('delete')
            ->requiresConfirmation()
            ->record(Category::find($id))
            ->action(function ($record) {
                \Log::info('test ' . $record->id);
                if($record->delete()) {
                    Notification::make()
                        ->title('Delete record ' . $record->id . ' successfully')
                        ->success()
                        ->send();
                }
            })
            ->icon("heroicon-m-trash")
            ->iconButton()
            ->color('danger')
            ->render();
    }
    public function renderGroupDeleteAction($id)
    {
        return Actions\Action::make('delete')
            ->requiresConfirmation()
            ->record(Category::find($id))
            ->action(function ($record) {
                \Log::info('test ' . $record->id);
                if($record->delete()) {
                    Notification::make()
                        ->title('Delete record ' . $record->id . ' successfully')
                        ->success()
                        ->send();
                }
            })
            ->icon("heroicon-m-trash")
            ->iconButton()
            ->color('danger')
            ->render();
    }

and use it on group\header.blade
  {!! $this->renderGroupDeleteAction($id) !!}
  {!! $this->renderGroupDeleteAction($id) !!}


did i use it wrong ?
image.png
Solution
Check this: https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component
Adding an action to a Livewire component - Actions - Filament
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

Add Action For Table Group
FilamentFFilament / ❓┊help
2y ago
Can I add action to Table Group ?
FilamentFFilament / ❓┊help
2y ago
Group Action for Table
FilamentFFilament / ❓┊help
3y ago
Add table filter to header actions
FilamentFFilament / ❓┊help
2mo ago