How to customize select option label (different when open/closed)
Is there a way to have a different render for the "preview" (when the select is closed) and for when the select is open ?
Here is my code
6 Replies
I didn't specify it but the label is defined in my Enum using HasLabel interface and getLabel() method.
How you get this feature? Is it FIlament 4?
I have try it and Description is not showed in Select Field.
In the docs also mentioned "HasDescription" applied for Radio and CheckboxList:
https://filamentphp.com/docs/3.x/support/enums#enum-descriptions
my bad, you said that it is implemented with getLabel, and using allowHtml, make sense.
Any hint ? If it can help, here is my enum code :
Not out of the box, you could target the css and hide it by default in the select display
Okay thanks !
Here is my solution, if anyone else want to use it (@jawaad) :
In my
EthnicityEnum.php
And in my app.css
: