Skip to content

Not able to apply CSS classes to MTableHeader #617

@wliu0921

Description

@wliu0921

I am trying to add a customized icon to action header, but there is a disabled container tag (TableSortLabel) wrapping up the customized part so that the icon is not able to be trigger.

My approach is applying css classes to MTableHeader in order to enable the pointer event for the disabled tag.
Here is the Demo
https://codesandbox.io/s/material-table-starter-template-forked-ct59d0?file=/package.json:154-220
Screen Shot 2022-09-15 at 3 50 04 PM

But the issue I have is In the @next version for MUI V5, css style is hard coding in MTableHeader component which is no longer from props and can't customize.
I'd expect the @next version of MTableHeader element is accepting css classes and apply to the TableCell component like what the master branch(v4) having right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions