© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Becker Maxime

Select multiple getSearchResultsUsing()

Hello, I have a problem when searching on a multiple select when I run it, it changes the intutile of the options by the ids and not the names.

Select::make('skills')->required()->multiple()->searchable()->getSearchResultsUsing(fn(string $search) => AlternativeOccupation::where('name', 'like', "{$search}%")->limit(50)->pluck('name', 'id'))->getOptionLabelUsing(fn($value): ?string => AlternativeOccupation::find($value)?->name),
Solution
Since you’re using multiple you need to use
getOptionLabelsUsing
getOptionLabelsUsing
with a “s” on Labels. You’ll need to change your closure as well to handle the array:
->getOptionLabelsUsing(fn ($values): array => YourModel::find($values)?->pluck('name', 'id')
->getOptionLabelsUsing(fn ($values): array => YourModel::find($values)?->pluck('name', 'id')
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

'name' gone in Select multiple() after getSearchResultsUsing()
FilamentFFilament / ❓┊help
3y ago
Select getSearchResultsUsing , Test read null
FilamentFFilament / ❓┊help
2y ago
Select using getSearchResultsUsing with preload
FilamentFFilament / ❓┊help
2y ago