How searchable() works on form enum Select?
My Select is defined like this:
Select::make('country')
->label('Country')
->required()
->options(Country::class)
->searchable()
Country class is enum, which implements HasLabel.
Is it exact match searching or some kind of Levenshtein? When i'm typing, select show records, which in my opinion should not be suggested.
When i typed "Polska" i see "Polska" option at first position, but select shows also options like: Bostwana, Kostaryka, Holandia, and many others.
Is it searchable() native behavior or i missed someting?

7 Replies
try ->searchable('name') or change the 'name' there with your field that contain Country name. Hope it helps.
Thanks, but i have enum Select, so there's no columns, just simple enums array key=>value.
Whats the value of these enums?
Here u can see example enum class.
So search will likely only work against 'PL', 'EN' etc I think
Nope, search works with labels, but in strange way - u can see on this screen.

The exact match is on 1 place, but few other option are also suggested, but i don't know why 🤷♂️