Material-table: Layout breaks in production build (create-react-app)

Created on 28 May 2019  路  6Comments  路  Source: mbrn/material-table

Describe the bug
I use React 16.8.6, material-ui/core v4.0.1 and material-table v1.36.4. In production build, when I move to a page where material table is being used, all the markup breaks.
After multiple clicks between pages everything becomes ok.
I thought that maybe it happens because of JSS classes

To Reproduce
Steps to reproduce the behavior:

  1. Use create-react-app -> npm run build
  2. Move to the page where material-table is being used
  3. See broken layout

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

image

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 70
bug

All 6 comments

To Remember:

@mbrn thank you, just installed 1.37.0 but the problem still exists. It happens only with a production build, when I use development server everythink is ok.
In production build after a couple of clicks the problem disappears

I'm facing the same issue.
React 16.8.6 and Material-UI 4.0.1.

Hi @serg-kan

I tried this case but it works properly.

I developed a page with appbar and table

My CRA:
"@material-ui/core": "^4.0.1",
"material-table": "^1.37.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"

@mbrn with these versions it worked, thank you.
I just changed "material-table": "1.37.0" to "material-table": "^1.37.0", can you please explain why does this changed the behavior?

it may upgraded to 1.38.0 that i publish a few hours ago :)

Just in case anyone stumbles here, it works only with exact set of versions as mentioned by @mbrn. Tried with "material-table": "^1.39.0" failed, "material-table": "^1.37.0" failed , even altering material core version "@material-ui/core": "^3.9.x" fails !

Was this page helpful?
0 / 5 - 0 ratings