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

DataTable: props stripedRows not working #4910

Closed
nazmulislam opened this issue Sep 11, 2023 · 4 comments
Closed

DataTable: props stripedRows not working #4910

nazmulislam opened this issue Sep 11, 2023 · 4 comments
Labels
Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior

Comments

@nazmulislam
Copy link

Describe the bug

The stripedRows is not working see the docs demo for example

Reproducer

No response

PrimeReact version

9.6.2

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@nazmulislam nazmulislam added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 11, 2023
@melloware
Copy link
Member

Hmm can you check my reproducer it seems to be working for me: https://stackblitz.com/edit/react-fjpupz

@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 11, 2023
@nazmulislam
Copy link
Author

So, i can confirm the striped rows are working, however, the striped background color is light and almost white.
I have attached a screenshot.
it would be useful to add prop for changing the background colour
Screenshot 2023-09-11 at 19 11 31

@melloware
Copy link
Member

Just use CSS:

.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd {
    background-color: darkgrey;
    color: white;
}

image

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
@melloware melloware added Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior and removed Status: Needs Reproducer Issue needs a runnable reproducer labels Sep 11, 2023
@nazmulislam
Copy link
Author

@melloware , many thanks for your help, I am now using the class property, to update the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior
Projects
None yet
Development

No branches or pull requests

2 participants