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: RowClass conditional styling not working #6194

Closed
elBurg0 opened this issue Mar 20, 2024 · 5 comments · Fixed by #6199
Closed

DataTable: RowClass conditional styling not working #6194

elBurg0 opened this issue Mar 20, 2024 · 5 comments · Fixed by #6199
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@elBurg0
Copy link

elBurg0 commented Mar 20, 2024

Describe the bug

Conditional formatting classes are rendered as class="[object Object]" resulting in the formatting not being applied.

Used to work up to primereact v10.5.1.

Reproducer

No response

PrimeReact version

10.5.3

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

Safari, Chrome

Steps to reproduce the behavior

  1. Create a datatable
  2. Add conditional formatting with rowClassName

This behavior can also be seen on the demo page: https://primereact.org/datatable/#conditional_style

Expected behavior

Conditional formatting of rows with classnames

@elBurg0 elBurg0 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 20, 2024
@melloware
Copy link
Member

I will investigate.

@elBurg0
Copy link
Author

elBurg0 commented Mar 20, 2024

Might be linked to issue #5983 resolved in #5995

@melloware
Copy link
Member

Yep that is definitely what caused it. I think I know the right fix

@melloware melloware self-assigned this Mar 21, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 21, 2024
@melloware melloware added this to the 10.6.0 milestone Mar 21, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 21, 2024
@Et7f3
Copy link
Contributor

Et7f3 commented Mar 21, 2024

@melloware you did not address my review #5996

@melloware
Copy link
Member

yep i broke it and submitted a fix. I had removed your wrapper classNames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants