I wonder if it's possible to change the input's color in runtime.
Here's my select (Webix ui.richselect): http://webix.com/snippet/c64f9b12
{
view:"richselect", label:"Status", options:[
{ id:1, value:"Done", $css:"done" },
{ id:2, value:"Processing", $css:"process" },
{ id:3, value:"On hold", $css:"on-hold" },
{ id:4, value:"Failed", $css:"failed" },
],
on:{
onChange:function(newV, oldV){
webix.message("Status changed to "+this.getList().getItem(newV).value)
}
}
}
Each $css key related to the CSS class that is applied to the item.
<style>
.webix_list_item.done {
background:#ddf7dd;
}
<!-- . . . -->
.webix_list_item.webix_selected {
color:black;
font-weight:bold
}
</style>
After changing the richselect's value, I need to set the background color of the newly selected item as the background color of the richselect.
In my opinion, it can be done through the onChange event, but I have no idea how exactly I can solve it.
Any suggestions? Thanks in advance.