F
Filament14mo ago
MrOlon

Selected option's label does not update in select field

What I am trying to do: I'm trying to change the options of a select field dynamically based on another field's value (a TextInput field). What I did: I pass a closure to the options method of the select field returning the new options based on another fields' value read with $get. The other field has live() (and, I don't know if relevant, native(false)). My issue/the error: The select's options are correctly updated: after changed the value of the text input field, opening the select I see the expected new options.
The options generated by the closure are always the same two options with the same key/id but with a different label. The issue is that the label of the selected option does not update when the options' labels change, but only when I click the select field to see the options. I think this is an expected behaviour due to the fact that the select's state does not actually change and the component's refresh happens only when the select field is clicked and the options are refreshed. Is there a way to trigger an update even if the state is the same? Thank you in advance!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server