© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
bionary

Filters applied on load?

using Filament v.2
using Filament v.2

I have a table widget with some filters. I have a "less then pricing" filter for input pricing.
When the page/table loads the filter is being applied automatically with a value == 0.
How do I prevent table widget filters from being applied on load? (with filament v.2)
Relevant code:
            Filter::make('max_price')
                ->form([
                    TextInput::make('max_price_input')->label('Maximum price')
                ])->columns(2)
                ->query(fn (Builder $query, $data): Builder => $query
                    ->where('price', '<=', (int)$data['max_price_input'])
                )
                ->indicateUsing(function (array $data): array {
                    $indicators = [];
                    if ($data['max_price_input'] ?? null) {
                        $indicators['max_price_input'] = 'Max price = $' . number_format($data['max_price_input'], 0);
                    }
                    return $indicators;
                })
            Filter::make('max_price')
                ->form([
                    TextInput::make('max_price_input')->label('Maximum price')
                ])->columns(2)
                ->query(fn (Builder $query, $data): Builder => $query
                    ->where('price', '<=', (int)$data['max_price_input'])
                )
                ->indicateUsing(function (array $data): array {
                    $indicators = [];
                    if ($data['max_price_input'] ?? null) {
                        $indicators['max_price_input'] = 'Max price = $' . number_format($data['max_price_input'], 0);
                    }
                    return $indicators;
                })
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

Disable pagination when filters are applied.
FilamentFFilament / ❓┊help
2y ago
Custom Table Filter and Applied filters?
FilamentFFilament / ❓┊help
3y ago
How to remove applied filters from url
FilamentFFilament / ❓┊help
3y ago
active filters are applied but doesn't appear on table.
FilamentFFilament / ❓┊help
3y ago