Skip to content

Upgrade Material Renderer Inputs to be aware of Variant #1797

@crgmz

Description

@crgmz

Is your feature request related to a problem? Please describe.

When using the material renderers, it would be nice to have the option to use the different material-ui input variants (standard, filled, outlined).

Currently the material renderers are implemented using the Input component with no option to change the variant. That means you have to implement custom renderers if you want to use other variants.

Describe the solution you'd like

The ideal solution would be updating the material renderers to take into consideration variants declared in a custom material theme provided to the JsonForms component, that way you can use material-ui's built-in theme support to build a custom theme and material renderers would choose the appropriate variant (or the standard variant if no custom theme is defined).

Describe alternatives you've considered

There's two alternatives by implementing custom renderers:

  1. Copy/pasting the material renderers source and changing the Input component to the variant you want. This means you now how to keep track of changes to source for this renderer.
  2. Implementing your own custom renderer from scratch, meaning you have to re-invent the wheel and take care of possible edge cases that the material renderers library already covers.

Framework

React

RendererSet

Material

Additional context

If the team agrees this would be a good feature to implement, I'm willing to work on it and submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions