A stripedRows prop on the TableBody that applies striping.
Our Situation
We did our own striping (using nth-of-type(odd) CSS selector on the table body's styled component) but that ends up having has higher CSS specificity than the TableRow component itself. That worked fine enough but now we wanted allow for table row selection. Due to our CSS styling on the table, the selected style applied by the TableRowselected prop doesn't show up, as the striping is taking priority.
We've fixed it by applying the styling that the selected prop applies to the row ourselves directly on the component so that the CSS specificity is higher than our striping on the TableBody, but it would be nice if we could simply use the selected prop and a library-provided striping.
Feature Request
A
stripedRows
prop on theTableBody
that applies striping.Our Situation
We did our own striping (using
nth-of-type(odd)
CSS selector on the table body'sstyled
component) but that ends up having has higher CSS specificity than theTableRow
component itself. That worked fine enough but now we wanted allow for table row selection. Due to our CSS styling on the table, the selected style applied by theTableRow
selected
prop doesn't show up, as the striping is taking priority.We've fixed it by applying the styling that the
selected
prop applies to the row ourselves directly on the component so that the CSS specificity is higher than our striping on theTableBody
, but it would be nice if we could simply use theselected
prop and a library-provided striping.