Material-UI- Warning

Viewed 2328

I'm using Material UI tabs for the first time in my project, everything works fine but there is one error in console while running the project here is:

Warning: Failed prop type: Material-UI: overlap="rectangle" was deprecated. Use overlap="rectangular" instead.

3 Answers

If you use the Badge component add or change the value of the overlap property to rectangular.

<Badge overlap="rectangular" .../>

The error comes from the Badge.js

 if (overlap === 'rectangle') {
  throw new Error('Material-UI: `overlap="rectangle"` was deprecated. Use `overlap="rectangular"` instead.');
}

I hope that will give some peace of mind to some ;)

I was suffering from the same phenomenon. Are you using @material-ui/data-grid?

I solved it by using @mui/x-data-grid.

One thing to note is that you need to downgrade react.

$ npm i react@17.0.0 react-dom@17.0.0

After typing this one.

npm install @mui/material @emotion/react @emotion/styled
npm install @mui/x-data-grid
npm install @mui/icons-material

Execute this command.

After that, change the import.

import { DataGrid } from '@mui/x-data-grid'

Sorry if the error is not resolved.

Must be due to conflicting versions of the library, I've changed as many imports starting with "@material-ui/..." as possible with the newer one starting with "@mui/material" and it worked for me

Related