I did some tests.
Here is the results between 2 differents format
My data is structured as follows (first table)
[
{
"value": {
"id": 7593,
"product_name": "productA",
"qty": 393,
"view_cell_content": "ahahah"
},
"style":{
"backgroundColor": "#9eeaf9"
}
},
{
"value": {
"id": 1234,
"product_name": "productB",
"qty": 150,
"view_cell_content": "ohoho"
},
"style":{
"backgroundColor": "#9eeaf9"
}
}
]
I did this because I wanted to color the line in 1 time.
If I modify the structure in this way (2nd table), it works.
[
{
"id": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": 7593
},
"product_name": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": "productA"
},
"qty": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": 393
},
"view_cell_content": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": "ahahah"
}
},
{
"id": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": 1234
},
"product_name": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": "productB"
},
"qty": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": 150
},
"view_cell_content": {
"style": {
"backgroundColor": "#9eeaf9"
},
"value": "ohoho"
}
}
]
So I think I have to use the second form, but it requires repeating the backgroundColor property for every element.
I’m using version 8.1.25. It may be different in newer versions (I haven’t tested).