Skip to content

Show title above anyOf control #1929

Open
@lovervoorde

Description

@lovervoorde

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

I would like to (optionally) show the title from the schema above the anyOf control (and other similar controls).
I am happy to make a PR if you think this is a good idea.

Describe the solution you'd like

I think it would just be a case of adding something like this to MaterialAnyOfRenderer, with a bit of logic to make it optional (and probably hidden by default so we don't cause unexpected changes in existing usages).

<Typography>
  {schema?.title}
</Typography>

Describe alternatives you've considered

I have tried wrapping the existing component and including a title, but got an import error trying to import the 'pure' component: ./src/components/common/renderers/AnyOfRenderer.tsx Module not found: Can't resolve '@jsonforms/material-renderers/lib/complex/MaterialAnyOfRenderer' in '/usr/app/src/components/common/renderers'. I may have been doing this incorrectly, but either way I think including the title in the original component would be cleaner.

Framework

React

RendererSet

Material

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions