© 2026 Hedgehog Software, LLC

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

Customize table default search debounce behavior

I am currently using a filament table search at one of the main pages of the website. If the users enters a letter, the search will be triggered immediately which creates some db load.

How could I customize the default search to require a minimum of letters to be entered, search only when leaving the field or on enter, debounce timing and so on. I was able to do this with a custom form in a TextInput on getTableFilters with min() and lazy() but not with the default search field. Any recommendations how to do this?

    protected function getTableColumns(): array
    {
        return [
            Tables\Columns\TextColumn::make('name')
                ->limit(40)
                ->searchable(query: function (Builder $query, string $search): Builder {
                    return $query
                        ->where('name', 'like', "%{$search}%")
                        ->orwhereRelation('names', 'name', 'like', "%{$search}%");
                }),
        ];
    }
    protected function getTableColumns(): array
    {
        return [
            Tables\Columns\TextColumn::make('name')
                ->limit(40)
                ->searchable(query: function (Builder $query, string $search): Builder {
                    return $query
                        ->where('name', 'like', "%{$search}%")
                        ->orwhereRelation('names', 'name', 'like', "%{$search}%");
                }),
        ];
    }
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

Defer, debounce search in table
FilamentFFilament / ❓┊help
3y ago
Customize or override default behavior of page title
FilamentFFilament / ❓┊help
2y ago
Customize attach search query
FilamentFFilament / ❓┊help
2y ago
Customize the default Create Button Process/Action on Table
FilamentFFilament / ❓┊help
3y ago