Hi,
This seems to be a basic use case, so I expect I’m being a bit stupid, but I can’t find in the documentation how to pass a set of standard Material UI component props into all the rendered elements of my form. For example, variant=“filled”, fullWidth. Is this possible?
sdirix
(Stefan Dirix)
July 27, 2021, 12:04pm
2
Hi @econtentmaps , these use cases are usually served via the Material UI theme support , including such props.
Is there a use case you can’t accomplish this way?
cg-dev
(cg-dev)
August 3, 2021, 4:17am
3
Hello Stefan,
I’m attempting to use material theme support to change the form input variant but the inputs seem to be ignoring the theme props
const theme = createMuiTheme({
props: {
MuiFormControl: {
variant: 'outlined',
},
MuiTextField: {
variant: 'outlined',
},
},
});
Date inputs change according to custom props, but text inputs ignore them.
I am able to reproduce the issue in 2.5.2 and 3.0.0-alpha.1.
Any insight would be appreciated.
sdirix
(Stefan Dirix)
August 11, 2021, 2:27pm
4
Hi @cg-dev ,
the problem here is that we don’t use MuiTextField
in our renderers but just a regular Input
. Therefore the props can’t apply.
If you’d like to use MuiTextField
instead you’ll need to implement a custom renderer.