Select input not working when searchable is appended
The select input I added to my form doesn’t work in the sense that it return “School name is required” even though I have selected a school. I don’t face this issue when I comment out the searchable method
16 Replies
You need to show some code, otherwise its just guessing 🤓
@dissto
Put the options in a callback, so,
->options( fn () => School::all()->etc
That will force it to be re-evaluated
@awcodes I'm still facing the same issue
Is this a relationship?
@awcodes no please A student registration form where we selecct the student's school
Sounds like a relationship to me. In which case the relationship could be off considering the code provided doesn’t use a relationship.
@awcodes What do you have in mind?
I really don’t know, just making a best guess on the code you’ve shared.
But it looks like a relationship to me which means the select needs to be based on the relationship instead of the options modifier.
But everything works perfectly without the searchable and works nicely in the admin panel with the same select @awcodes
Ok, but those are 2 completely different use cases.
Panels have a lot of preconfigured expectations. If you aren’t in a panel context then you have to connect all the pieces.
@awcodes I get it
Thank you
I guess this can be a bug on recent version of the select field, mine was running just fine, but after composer update it stop working, the same error showing on https://discord.com/channels/883083792112300104/1296146287460093982
Have you found any fix?
Have you update to Filament 3.2.119? it will fix.
I’ll try it
@Zen Dev I'm still getting the same issue