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: even is not working #685

Open
neurojavi opened this issue Dec 20, 2024 · 0 comments
Open

Striped: even is not working #685

neurojavi opened this issue Dec 20, 2024 · 0 comments

Comments

@neurojavi
Copy link

When DataTable in configured with striped="even" it applies stripedColor to odd rows. In other words: it always applies stripedColor to odd rows.

In core Mantine Table, TableProps:
striped boolean | "odd" | "even" Determines whether every odd/even row background should be changed to strippedColor, if set to true, then odd value will be used, false by default

Since DataTable imports and reuse core Table Props (since striped is not omitted in DataTableProps when it adds TableProps), I think it would be expected to have the same configuration and behavior.

"@mantine/core": "^7.13.2",
"mantine-datatable": "^7.14.5"

The problem seems to be in DataTable.css:

&[data-striped] tbody tr:nth-of-type(odd) {
background: var(--mantine-datatable-striped-color);
}

Thanks for this excellent component!

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