Hi,
can anyone provide example how to color text in treeview in react according to database response.
For example,if trans is equal to 10 all elements that have trans equal to 10 will be colored to red..
In this example 'Furniture' will be colored in color red, or if trans is equal to 30 'aaa' will be colored in blue for example
const tree = [{
text: 'Furniture',
trans:10,
items: [{
text: 'Tables & Chairs',
trans:20,
}, {
text: 'Sofas',
trans:50,
}, {
text: 'Occasional Furniture',
trans:50,
}]
}, {
text: 'Decor',
trans:50,
items: [{
text: 'Bed Linen',
trans:50,
items:[{text:'aaa', trans:30}]
}, {
text: 'Curtains & Blinds',
trans:50
}, {
text: 'Carpets',
trans:50
}]
}];