F
Filament14mo ago
Sanjaya

Searching individually

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