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

Add setCellHeaderProps #871

Closed
mikroware opened this issue Aug 27, 2019 · 5 comments
Closed

Add setCellHeaderProps #871

mikroware opened this issue Aug 27, 2019 · 5 comments

Comments

@mikroware
Copy link

Add setCellHeaderProps just like how setCellProps is there already.

Expected Behavior

setCellHeaderProps should work the same as setCellProps. It should be passing those props to the underlying TableCell. With this feature one can style the header cell just like the rest of the cells.

Current Behavior

Does not exist for header cells (only for normal cells through setCellProps).

(feature request created as of discussion in #400)

@marek-jarab
Copy link

Hi. I would like to start working on that . Could you pls assign me to this issue?

@gabrielliwerant
Copy link
Collaborator

There is already a PR open for this feature, so I have to check on the status of that.

@shawnmitchell
Copy link
Contributor

Would it not make sense for align to be a first-class column option?

const columns = [
 {
  name: "Name",
  options: {
   filter: true,
   sort: false,
   align: 'right',
  }
 },
 ...
];

@austin557
Copy link

Has any progress been made on this?
I cannot get my column headers to center align while using the responsive: "scrollFullHeight" option.

@gabrielliwerant
Copy link
Collaborator

Yes, this feature has been added as of 2.13.0, but align on the th won't help you because the column name is wrapped in flex display mode when there is a sort button. So you'll actually need to override styles instead: MUIDataTableHeadCell sortAction and set justify-content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants