Style/color code entries in SelectColumn dropdown list
Is it possible to stylze the select dropdown in the column/table view? I have a status dropdown that I'd like to indicate with color where possible.
Solution:
Jump to solution
I would use
recordClasses
to apply styles by table rows
https://x.com/leandrocfe/status/1801233185092542591?t=Dm1xl7ixjL64mINmV1b_oA&s=19...Leandro Ferreira (@leandrocfe)
π‘ Filament Tip: Use $table->recordClasses(...) to apply different styles to table rows based on their record values π

X
8 Replies
Color on what part exactly? But you do have the option to create a custom select column for your needs.
I'd like to color the selection with green whtn the value is 1 or 'active' but hte drop-down seems to be fixed to the os style
or alternatively, i can set the cell's background color based on that value instead
Hmm, i guess you could do it with custom css, but that feels fragile to me in this use case. The bg color might be more appropriate.
Solution
I would use
recordClasses
to apply styles by table rows
https://x.com/leandrocfe/status/1801233185092542591?t=Dm1xl7ixjL64mINmV1b_oA&s=19Leandro Ferreira (@leandrocfe)
π‘ Filament Tip: Use $table->recordClasses(...) to apply different styles to table rows based on their record values π

X
thank you!
did it work?
hi
@Leandro Ferreira sorry for teh delay - yes it did - thank you so much!