© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•7mo ago•
8 replies
Asmit

Help: Filter Reset Action

I’m building a custom Filament page where I’m not using a table, but I added a FilterAction to handle filtering. It’s working, but I’m struggling to add a reset button to clear the filters from the modal form.
public function filterAction()
    {
        return FilterAction::make('filter')
            ->slideOver(false)
            ->form([
                TextInput::make('title')
                    ->live()
                    ->label('Search'),
                Select::make('status')
                    ->label('Status')
                    ->options(DocumentStatus::class)
                    ->placeholder('All Statuses')
                    ->searchable()
                    ->preload(),
            ]);
    }
public function filterAction()
    {
        return FilterAction::make('filter')
            ->slideOver(false)
            ->form([
                TextInput::make('title')
                    ->live()
                    ->label('Search'),
                Select::make('status')
                    ->label('Status')
                    ->options(DocumentStatus::class)
                    ->placeholder('All Statuses')
                    ->searchable()
                    ->preload(),
            ]);
    }


In my Blade view, I render it like:
{{ $this->filterAction }}
{{ $this->filterAction }}

How can I add a reset/clear action to this filter modal?
Any help would be appreciated!
Solution
Suer, @Dennis Koch ,

For now,
 ->extraModalFooterActions(function () {
                return [
                    Action::make('reset')
                        ->label('Reset')
                        ->color('secondary')
                        ->icon('heroicon-o-x-circle')
                        ->action(function () {
                          // reset data.
                            $this->reset('property');
                            $this->replaceMountedAction('cancel');
                        }),
                ];
            })
 ->extraModalFooterActions(function () {
                return [
                    Action::make('reset')
                        ->label('Reset')
                        ->color('secondary')
                        ->icon('heroicon-o-x-circle')
                        ->action(function () {
                          // reset data.
                            $this->reset('property');
                            $this->replaceMountedAction('cancel');
                        }),
                ];
            })

this solution work for me
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

reset filter fields
FilamentFFilament / ❓┊help
2y ago
Filter reset button position
FilamentFFilament / ❓┊help
3y ago
reset filter -Per page options not reset
FilamentFFilament / ❓┊help
3y ago
Export Action with Filter
FilamentFFilament / ❓┊help
13mo ago