© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Óscar

Action in ToggleColumn

Hi. I have the following code in a table of a resource:

Tables\Columns\ToggleColumn::make('is_premium')
    ->searchable()
    ->sortable()
    ->action(
        function(User $record) {
            dd($record);
        }
    ),
Tables\Columns\ToggleColumn::make('is_premium')
    ->searchable()
    ->sortable()
    ->action(
        function(User $record) {
            dd($record);
        }
    ),


What I want to achieve is that when I click on the cell, the function inside ->action() is triggered to implement additional logic of the column value change.

It only works if I change the column type to TextColumn, but with ToggleColumn nothing happens.

Any idea? thanks
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

ToggleColumn Action
FilamentFFilament / ❓┊help
3y ago
ToggleColumn restore action
FilamentFFilament / ❓┊help
2y ago
ToggleColumn and Modal Confirmation (Action?)
FilamentFFilament / ❓┊help
3y ago
How to put action on toggleColumn?
FilamentFFilament / ❓┊help
2y ago