I have created a Table using the that implements Column Resizing. Column resizing behaves normally except the resize handles are invisible.
Snipped from package.json
"@devexpress/dx-core": "^1.3.0",
"@devexpress/dx-grid-core": "^1.3.0",
"@devexpress/dx-react-core": "^1.3.0",
"@devexpress/dx-react-grid": "^1.3.0",
"@devexpress/dx-react-grid-material-ui": "^1.3.0",
"@material-ui/core": "^1.2.0",
"jss": "^9.8.2",
"react": "^16.4.0",
Hi,
Thank you for your feedback. To solve this problem, you can add the聽ThemeProvider component.
Please follow this聽example聽for detailed information.
Thanks for the reply. I already have a theme provider in my application but the handles are still invisible
Make sure that you specify a聽primary color for your theme.
const myTheme = createMuiTheme({
palette: {
type: "light",
primary: blue
}
});
Thanks again for the reply, but I definitely have a primary color set
Does your theme contain this color?
Ah-ha, thats a good lead. I'll check it out, thanks
Yes this looks like it could be the source of the issue. My theme is set up to use a single hex color as Primary, and infer the other colors from there.
See "Providing the colors directly" here
edit: Yep, palette.primary[300] is undefined
edit: I suggest using something like using the theme getContrast against one of the palette properties thats guaranteed to be there
I'm just coming back around to this now, is there any way to fix this without redefining how my applications colors are being generated?
No. You should define the grid's theme as follows:
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import { blue } from '@material-ui/core/colors';
const lightTheme = createMuiTheme({
palette: {
type: 'light',
primary: blue,
},
});
const GridWrapper = ({ children }) => (
<MuiThemeProvider theme={lightTheme}>
{children}
</MuiThemeProvider>
);
That totally wrecked my app's theme, but led me to a workaround:
const theme = createMuiTheme(themeSource);
theme.palette.primary[300] = theme.palette.getContrastText(
theme.palette.background.default
);
Thanks for the assistance
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.
Most helpful comment
That totally wrecked my app's theme, but led me to a workaround:
Thanks for the assistance