© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Colin

SelectFilter query not working as expected

I am on Filament version 3.0.68

I have the following select filter:

            ->filters([
                SelectFilter::make('division')
                    ->multiple()
                    ->native(false)
                    ->searchable()
                    ->options([
                      'NCAA D1',
                      'NCAA D2'
                    ])

            ])
            ->filters([
                SelectFilter::make('division')
                    ->multiple()
                    ->native(false)
                    ->searchable()
                    ->options([
                      'NCAA D1',
                      'NCAA D2'
                    ])

            ])


I expect to see filament query by 'NCAA D1' or 'NCAA D1', but I see this

select count(*) as aggregate from `college_programs` where `sport_id` in (25) and (`division` in ('0'))
select count(*) as aggregate from `college_programs` where `sport_id` in (25) and (`division` in ('0'))

Basically the index of the option is being passed in. This is what it looks like for a normal select filter:

select count(*) as aggregate from `college_programs` where `sport_id` in (25) and (`division` = '0')
select count(*) as aggregate from `college_programs` where `sport_id` in (25) and (`division` = '0')


Any ideas what I may be doing wrong?
Solution
Apparently my issue was that I needed to pass key / value for options. 🤦‍♀️
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SelectFilter default not working
FilamentFFilament / ❓┊help
16mo ago
Notifications Markup not working as expected?
FilamentFFilament / ❓┊help
2y ago
TextColumn action not working as expected
FilamentFFilament / ❓┊help
2y ago
TableWidget Actions not working as expected
FilamentFFilament / ❓┊help
3y ago