© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
Phil

Hydrate Select with key => value state

I use the select field with values that are retrieved via API.
To do this, I return a Key => Value array in getSearchResultsUsing().
This also works when creating the record. The selected keys are saved correctly and Value is displayed.

If I open the form later for editing, only the saved keys are displayed. Now I try to use mutateFormDataBeforeFill or afterStateHydrated to transform the keys into a Key => Value Array.
However, the Select field then remains empty. There was a question about this on Github last year that was not answered.

https://github.com/filamentphp/filament/discussions/9941
GitHub
Select field hydration · filamentphp filament · Discussion #9941
I'm using icons in select field, found a problem - if an icon not in "loaded-by-default-options" - it will not be rendered. So i need to render it arter field was filled with data. Fo...
Select field hydration · filamentphp filament · Discussion #9941
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

Select box key-value pair
FilamentFFilament / ❓┊help
2y ago
Select Field Options Key And Value
FilamentFFilament / ❓┊help
2y ago
Repeater with key:value
FilamentFFilament / ❓┊help
2y ago
Key-value Field with dot in key
FilamentFFilament / ❓┊help
12mo ago