Support extra material ui options for fields
See original GitHub issueMaterial-UI’s form fields support more UI configurations, but those config settings are not exported to the user with the current widgets. For example - if you look at the current implementation of the RangeWidget you can see the following:
<Slider
{...sliderProps}
disabled={disabled || readonly}
onChange={_onChange}
onBlur={_onBlur}
onFocus={_onFocus}
/>
MateriaUI’s Slider component support also properties, such as marks/scale/orientation/valueLabelDisplay and others. This is just an example for the Slider widget, but other widgets will probably have other properties that we would like to support.
There are multiple ways to solve this, I think it’s best to do this from the uiSchema
(since it’s not related to the schema itself).
My suggestion is to have ui:props
in the uiSchema
of the field, and pass these values to the field itself.
I’m happy to open a PR for this, in case it makes sense.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:8 (3 by maintainers)
We started using react-jsonschema-form with Material UI recently and we also noticed that extra properties supported by default in Material UI. Specifically in our case we needed the “className” property.
Also I could not find a working example of how to have the same setup as on https://cybertec-postgresql.github.io/rjsf-material-ui/ because in our case passing
format: "email"
to a string type would not render using the TextField from MUI.Any updates on this. Seems PR is done for a fix to issue but hasn’t yet been merged.