Can I filter my textcolumn using a select instead of a textbox?

I've made a table with several TextColumns, each of which has an individual column search box above it. However one of the columns only has a limited number of possible values. Is there a way to change the search textbox into a select for that column only?
Solution:
No, that is not an option in Filament presently. The table component calls the search field component which is only a text input. So to do that would require building a select input to replace the text input. Further, the logic for the applied search would need changing in order to determine how to adjust the search in order to filter correctly: https://github.com/filamentphp/filament/blob/d88debaf627171ce183216205f48ec76b49b785f/packages/tables/src/Concerns/CanSearchRecords.php#L91-L101...
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
GitHub
filament/packages/tables/resources/views/index.blade.php at d88deba...
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
GitHub
filament/packages/tables/src/Concerns/CanSearchRecords.php at d88de...
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
Jump to solution
1 Reply
Solution
DrByte
DrByte6mo ago
No, that is not an option in Filament presently. The table component calls the search field component which is only a text input. So to do that would require building a select input to replace the text input. Further, the logic for the applied search would need changing in order to determine how to adjust the search in order to filter correctly: https://github.com/filamentphp/filament/blob/d88debaf627171ce183216205f48ec76b49b785f/packages/tables/src/Concerns/CanSearchRecords.php#L91-L101
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
GitHub
filament/packages/tables/resources/views/index.blade.php at d88deba...
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
GitHub
filament/packages/tables/src/Concerns/CanSearchRecords.php at d88de...
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