Open BohdanYavorskyi opened 4 years ago
That's the result of webpack (local-css).
Well... maybe not.
Could you give me an CodeSandBox
I believe @wdh2100 is right, and this isn't a mui-datatables thing, it's how JSS was setup to work. It shouldn't really impact anything though. I use overrides in my code with the original names and everything still works fine.
I believe @wdh2100 is right, and this isn't a mui-datatables thing, it's how JSS was setup to work. It shouldn't really impact anything though. I use overrides in my code with the original names and everything still works fine.
I use overrides as well. Everything works amazingly except that case with "MUIDataTableHeadCell-toolButton" class. It is not a custom one. This class comes from the library itself.
That's the result of webpack (local-css).
Well... maybe not.
Could you give me an
CodeSandBox
I can see css class in SandBox.
https://codesandbox.io/s/youthful-lederberg-6cunm?file=/src/App.js
As a result of webpack, jss-xxx
means local css.
https://github.com/gregnb/mui-datatables/blob/master/src/components/TableHeadCell.js
Here we are using a style override (local css-include jss) on the button.
Attacments: Dev:
Prod:
As a result, it looks like this.
production mode : https://webpack.js.org/plugins/uglifyjs-webpack-plugin/
@BohdanYavorskyi are you saying your override for "MUIDataTableHeadCell-toolButton" is not working in production?
Try adding a StylesProvider to you app: (see the createGenerateClassName example at the top)
https://material-ui.com/styles/api/
It may be that some of your classnames are having collisions. I was able to override the classes fine in production mode.
@BohdanYavorskyi are you saying your override for "MUIDataTableHeadCell-toolButton" is not working in production?
Try adding a StylesProvider to you app: (see the createGenerateClassName example at the top)
https://material-ui.com/styles/api/
It may be that some of your classnames are having collisions. I was able to override the classes fine in production mode.
@patorjk yeah, I'm overriding this class. I use a default StylesProvider
Thead th cell has span inside it with role="button" and class="MUIDataTableHeadCell-toolButton-[mui-number-prefix]" in development mode. But in production there is no class="MUIDataTableHeadCell-toolButton-[mui-number-prefix]".
Expected Behavior
The class must be present in production mode as well as in Development one.
Current Behavior
The class is present just in development mode.
Steps to Reproduce (for bugs)
Your Environment
Attacments: Dev:
Prod: