Skip to content

DataTable: RowClass conditional styling not working #6194

Closed

Description

@elBurg0

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

Activity

  1. melloware commented on Mar 20, 2024

    @melloware
    Member

    I will investigate.

  2. elBurg0 commented on Mar 20, 2024

    @elBurg0
    Author

    Might be linked to issue #5983 resolved in #5995

  3. melloware commented on Mar 21, 2024

    @melloware
    Member

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

  4. self-assigned this
    on Mar 21, 2024
  5. added this to the 10.6.0 milestone on Mar 21, 2024
  6. added a commit that references this issue on Mar 21, 2024
    5d7c0d7
  7. Et7f3 commented on Mar 21, 2024

    @Et7f3
    Contributor

    @melloware you did not address my review #5996

  8. melloware commented on Mar 21, 2024

    @melloware
    Member

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

  9. added a commit that references this issue on Mar 25, 2024
    cec8ca8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions