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

Warning: MTableHeader: Support for defaultProps will be removed from function components in a future major release #832

Open
jalbissimo opened this issue Feb 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jalbissimo
Copy link

Describe the bug
A warning appears in the console saying "Warning: MTableHeader: Support for defaultProps will be removed from function components in a future major release"

To Reproduce
Have installed the following dependencies

  • "react": "18.2.0"
  • "react-dom": "18.2.0"
  • "@material-table/core": "6.2.11"
  • "@mui/material": "5.14.10",
  1. Open browser console
  2. Warning: MTableHeader: Support for defaultProps will be removed from function components in a future major release appears

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome
  • Version: 121.0.6167.161
@jalbissimo jalbissimo added the bug Something isn't working label Feb 9, 2024
@Ggilb3rt
Copy link

Hello !

Got same error here with MTableBodyRow, MTableCell and more.

Using :

  • "next": "14.1.0"
  • "react": "^18"
  • "react-dom": "^18"
  • "@mui/base": "^5.0.0-beta.34"

I don't know how to help, I find this article maybe he could help.

@rodrigoverasantis
Copy link

Same here, but it does nothing other than bother.

Using :

  • "@emotion/cache": "^11.11.0",
  • "@emotion/react": "^11.11.3",
  • "@emotion/server": "^11.11.0",
  • "@emotion/styled": "^11.11.0",
  • "@material-table/core": "^6.3.2",
  • "@mui/icons-material": "^5.15.9",
  • "@mui/material": "^5.15.9",
  • "@mui/material-nextjs": "^5.15.9",
  • "@typegoose/typegoose": "^12.1.0",
  • "dayjs": "^1.11.10",
  • "mongoose": "^8.1.1",
  • "next": "14.1.0",
  • "react": "^18",
  • "react-dom": "^18"

@Domino987
Copy link
Contributor

Seems like a deprecation. If you want to work on a PR to change it to the new way to do it, you are more than welcome.

@SheldonWBM
Copy link

The deprecation warning is for React 19. React 19 is currently in beta. It is expected to be out of beta in June or July 2024.
So, the person working on the PR could a) Ensure it works without defaultProps in React 18 and b) Use React 19 Beta to test compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants