F
Filament16mo ago
Sanjaya

Searching individually

How to add debounce to TextColumn::make('name') ->searchable(isIndividual: true)?
10 Replies
Jeff
Jeff16mo ago
The docs say it's simply: ->searchDebounce(500)
Sanjaya
SanjayaOP16mo ago
I want to apply it to a TextColumn Table, I have tried debounce(500) it doesn't work
awcodes
awcodes16mo ago
TextColumn doesn’t have a debounce. It’s not an input. TextInputColumn might have it though.
Sanjaya
SanjayaOP16mo ago
Oh okay, I understand, so you can't use it on text columns, right?
DrByte
DrByte16mo 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
SanjayaOP16mo ago
Actually there is already debounce but it's hardcoded, right?
DrByte
DrByte16mo ago
That's what I'm seeing, yes. And that's what's happening in my app's searchable table-columns.
Sanjaya
SanjayaOP16mo ago
OK, thank you very much.
awcodes
awcodes16mo 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.

Did you find this page helpful?