F
Filament10mo ago
Sanjaya

Searching individually

How to add debounce to TextColumn::make('name') ->searchable(isIndividual: true)?
10 Replies
Jeff
Jeff10mo ago
The docs say it's simply: ->searchDebounce(500)
Sanjaya
Sanjaya10mo ago
I want to apply it to a TextColumn Table, I have tried debounce(500) it doesn't work
awcodes
awcodes10mo ago
TextColumn doesn’t have a debounce. It’s not an input. TextInputColumn might have it though.
Sanjaya
Sanjaya10mo ago
Oh okay, I understand, so you can't use it on text columns, right?
DrByte
DrByte10mo ago
Um ... adding ->searchable() to a Table TextColumn uses debounce(500) directly in the search field component: https://github.com/filamentphp/filament/blob/f14ec4205db67bf83a02d344fc8e923594676473/packages/tables/resources/views/components/search-field.blade.php#L25
GitHub
filament/packages/tables/resources/views/components/search-field.bl...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
Sanjaya
Sanjaya10mo ago
Actually there is already debounce but it's hardcoded, right?
DrByte
DrByte10mo ago
That's what I'm seeing, yes. And that's what's happening in my app's searchable table-columns.
Sanjaya
Sanjaya10mo ago
OK, thank you very much.
awcodes
awcodes10mo ago
Searchable ties the query to the the search input which, because it’s an input, or at least modelable allows it to be debounced or live.