Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Striped row table support #889

Open
lanesawyer opened this issue Nov 5, 2024 · 0 comments
Open

Striped row table support #889

lanesawyer opened this issue Nov 5, 2024 · 0 comments

Comments

@lanesawyer
Copy link

** Feature Request **

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 TableRow 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 the TableBody, but it would be nice if we could simply use the selected prop and a library-provided striping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant