question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support extra material ui options for fields

See original GitHub issue

Material-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:open
  • Created 4 years ago
  • Reactions:5
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cosmin-haranguscommented, Mar 15, 2020

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.

0reactions
skkohlicommented, Jun 26, 2022

Any updates on this. Seems PR is done for a fix to issue but hasn’t yet been merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Select component - Material UI - MUI
The Select component is implemented as a custom <input> element of the InputBase. It extends the text field components sub-components, either the OutlinedInput, ......
Read more >
Theming - Material UI - MUI
Think of creating a theme as a two-step composition process: first, you define the basic design options; then, you'll use these design options...
Read more >
Select API - Material UI - MUI
Name Type Default autoWidth bool false children node classes object
Read more >
Input API - Material UI - MUI
Name Type Default autoComplete string autoFocus bool false classes object
Read more >
React Grid component - Material UI - MUI
Grid · Grid with multiple breakpoints. Components may have multiple widths defined, causing the layout to change at the defined breakpoint. · Row...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found