© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•8mo ago•
2 replies
D5300

Dynamic select options doesnt remember selected value

Hello,

I got a dropdown field with 3 options. Depending on another option, it can become 5 options. When the dropdown changes from 3 to 5 or 5 to 3 options, it doesnt select the choice of the client, it remembers the clicked index of the dropdown. So for example

10 => England
20 => Germany
30 => France

I select for example Germany which has a ID of 20. Now im selecting a condition in my form so 2 more countries are added:

1 => Canada
5 => Spain
10 => England
20 => Germany
30 => France

The expected behavior should be that Germany remains selected as it is in the list with options, but what happens is that Spain gets selected as it contains the second position.

The afterStateUpdate doesnt work in this case as the state of my dropdown isn't changing
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

Displaying options base on selected value
FilamentFFilament / ❓┊help
3y ago
Filter enum value from select enum options (get all enum values but selected ones)
FilamentFFilament / ❓┊help
2y ago
How to make dynamic range Options Select Form Based on Selected State
FilamentFFilament / ❓┊help
3y ago