on 2023 Mar 09 2:42 PM
Hi Vinodkumar,
As far as I know, you will need to use CSS for this.
You can try adding a customData aggregation for your ListItem and set the property writeToDom="true". I have bound the status property of a JsonModel to the value property via expression binding so that the color would change accordingly. For more complex color coding, you can use a custom formatter.
view.xml
<core:customData>
<core:CustomData key="IconColor" value="{= ${IconModel>status} ? 'green' : 'red'}" writeToDom="true"/>
</core:customData>
style.css
[data-IconColor="red"]{
color:red;
}
[data-IconColor="green"]{
color:green;
}
Let me know if this worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Additional Information: https://stackoverflow.com/questions/62660869/sap-m-select-with-listitems-using-colored-icons
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.