F
Filament11mo ago
Horia

Dynamic select not saving data

I have a Edit Action for a table row. In the form I have a Select field which is dependant of other 2 fields in the form. I populate the select field like this:
Select::make('race_age_group_id')
->required()
->options(fn (Get $get): array =>
$this->getRaceAgeGroupOptionsFromAgeAndGender($get('birth_year'), $get('gender'))
),
Select::make('race_age_group_id')
->required()
->options(fn (Get $get): array =>
$this->getRaceAgeGroupOptionsFromAgeAndGender($get('birth_year'), $get('gender'))
),
My problem is that if the select field is updated (by changing the other 2 fields), the new value is not changed. It is only changed if I open the select dropdown and choose another option. What can I do to fix that? I would be OK even if I can just clear the select field, and force the user to choose the new option. Thanks!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server