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

TableCell not accepting className properly #29016

Closed
2 tasks done
oof2win2 opened this issue Oct 12, 2021 · 1 comment
Closed
2 tasks done

TableCell not accepting className properly #29016

oof2win2 opened this issue Oct 12, 2021 · 1 comment
Assignees
Labels
component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation v5.x migration

Comments

@oof2win2
Copy link

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

TableCell is not correctly accepting className, as it is not applying the CSS given there properly.

Expected Behavior 🤔

TableCell should apply className correctly and apply the CSS from there, such as font-family correctly.

Steps to Reproduce 🕹

Steps:

  1. Create a table with Table, TableHead, TableBody and place in some data using TableCell
  2. Add a className property to the TableCell in attempt to style it
  3. Apply the same CSS through the style prop
  4. Observe that the className method is not working, but the style prop is.
    Example is here

Context 🔦

I am trying to create a table and style the table cells. This is not working for some reason, the styles seem to be being overridden from the base TableCell class.

Your Environment 🌎

`npx @mui/envinfo`
Used Chrome, Firefox
  System:
    OS: macOS 11.4
  Binaries:
    Node: 16.6.2 - ~/.nvm/versions/node/v16.6.2/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.20.3 - ~/.nvm/versions/node/v16.6.2/bin/npm
  Browsers:
    Chrome: 94.0.4606.81
    Edge: Not Found
    Firefox: 93.0
    Safari: 14.1.1
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1 
    @emotion/styled: ^11.3.0 => 11.3.0 
    @mui/core:  5.0.0-alpha.50 
    @mui/material: ^5.0.3 => 5.0.3 
    @mui/private-theming:  5.0.1 
    @mui/styled-engine:  5.0.1 
    @mui/styles: ^5.0.1 => 5.0.1 
    @mui/system:  5.0.3 
    @mui/types:  7.0.0 
    @mui/utils:  5.0.1 
    @types/react: ^17.0.27 => 17.0.27 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    typescript: ^4.4.3 => 4.4.3 
@oof2win2 oof2win2 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 12, 2021
@oof2win2
Copy link
Author

Nevermind, fixed it. #28907 helped.

@mnajdova mnajdova self-assigned this May 23, 2022
@mnajdova mnajdova added component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation v5.x migration and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation v5.x migration
Projects
None yet
Development

No branches or pull requests

3 participants