© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
josef

Filtering by clicking on column

I'm trying to set a table filter by clicking on the corresponding value in a table column using
action()
action()
(as
extraAttributes()
extraAttributes()
gets escaped by blade).
Using the following code
Tables\Columns\TextColumn::make('column.name')
    ->searchable()
    ->alignEnd()
    ->description(__('Some Description'), 'above')
    ->action(function (Model $record) {
        $this->tableFilters['filterName'] = $record->value;
    }),
Tables\Columns\TextColumn::make('column.name')
    ->searchable()
    ->alignEnd()
    ->description(__('Some Description'), 'above')
    ->action(function (Model $record) {
        $this->tableFilters['filterName'] = $record->value;
    }),

has no effect.
The column (including the description, unfortunately) is clickable, and a request gets sent, but nothing else happens. Am I missing something? Do I have to tell the component to re-render?
Setting a filter in html using
wire:click="$set('tableFilters.filterName', [ '{{ $value }}' ])"
wire:click="$set('tableFilters.filterName', [ '{{ $value }}' ])"
does work fine, but is not achievable currently without overwriting the column templates and adding custom code.
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 open modal by clicking table column?
FilamentFFilament / ❓┊help
3y ago
Filtering by a related table column changes the table id
FilamentFFilament / ❓┊help
3y ago
Created By Column
FilamentFFilament / ❓┊help
3y ago