Here is my drop down list
<select id="productselect" aria-label="Single Select"
data-bind="ojComponent: {component: 'ojSelect', disabled: false,
value: productValue,optionChange: onChangeProduct,
rootAttributes: {style:'max-width:20em'}}">
<!-- ko foreach: products -->
<option data-bind="value:value, text:label, css:{labelclass:true}">
</option>
<!-- /ko -->
</select>
I would like to apply different colors to each list item by passing dynamic class, but not working. Please help.
Drop-down should be like
<option style = "color : red" data-bind="value:value, text:label">
<option style = "color : blue" data-bind="value:value, text:label">
and so on...
How to achieve this type of drop-down dynamically.