Skip to content

DataTable with groupBy , how to change background color for the expandable row? #6625

@vldmr1986

Description

@vldmr1986

I have an expandable table, and I need to change the background color for the expandable rows only.
I use "rowProps" to manage the background color, but it does not work.
I made a unique key specifically for the expandable row, but it still didn't help

Expected Behavior

<DataTable
  paginate={true}
  // colors for row, how to apply to the expandable row?
  rowProps={rowProps}
  groupBy="company"
  primaryKey="uniqId"
  columns={[
    { property: "company", header: "Company" },
    { property: "employee", header: "Employee" }
  ]}
  data={data}
/>

URL, screen shot, or Codepen exhibiting the issue

Screenshot 2023-02-07 at 16 01 15

-- Here's a Codesandbox template that serves as a nice starting point
-- for demonstrating an issue: https://codesandbox.io/s/groupby-not-working-with-paginate-forked-42kzv3?file=/src/App.js

Metadata

Metadata

Assignees

Labels

bugissue that does not match design or documentation and requires code changes to address

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions