Hi I have an issue please help me to fix it
Since your background coloring will NOT depend on the even/odd index information, you should simply use another approach for the styling.
What I would do personally is use CSS classes to identify the initial even/odd rows and when a row get extended give its children the same class.
You didnt share the 'expand' code so I do not really know how you could do that but something like that:
<tr
key={i}
className={`Itable-row-default table-row-${i} ${i%2 === 0 ? 'table-white' : 'table-grey'}` }
>
<td colspan={columnData.length + 1}>
{dataExpand[i]}
</td>
</tr>
And the associated css
tr {
&.table-gray {
background: gray;
}
&.table-white {
background: white;
}
}
Depending on the 'onExpandHandler' method & the format of your initial model this might need some adaptations though :)
(oh and you should favor screenshots for images :p)