Searching individually

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