Changing Selected Item background and text color in Select input
Hello everyone,
I have a model which has two columns named background_color and text_color. Is there any way I can change the background and text color of the selected record according to the value of these columns?
9 Replies
Don’t think that is possible with this component. Sorry.
I just had a little hope. 🥲 Thank you. 🙏
Something like this maybe?
Thank you for your answer but i did it already and you can do this with ->allowHtml() and ->getOptionLabelFromRecordUsing() methods.
I want to change colors of the whole "badge" container. Something like this
but more clean way of course, deselect icon and border/ring colors too.
Nice, I mean it could look a bit better but your approach is not bad at all 🙂 Maybe share your code to help other in the future
Good job.👏
I think I was misunderstood, sorry, I haven't realised this yet. The image I showed as an example was ‘exactly what I wanted to do’.
I do same thing with as you talk about like this;
Sooooo, i did something but it still doesn't work properly. I have to tinker a little more.