Headings for enum arrays with uniqueItems=true?

Hi,

The default renderer (MaterialEnumArrayRenderer as far as I can tell) for enum arrays with uniqueItems=true, renders elements as checkboxes. That’s fine, but is it somehow possible to get JSON Forms to add a heading for each array?

Hi @jva,

Instead of enum you can also use a oneOf: [{const: <value>, title: <label>}]. This way you can define labels for your values within the JSON Schema. See the docs here.

Alternatively you can use our i18n support to customize the labels. See the docs here.

Hi Stefan,

Thanks.

I will try out your suggestion.

Hi @sdirix,

I see now, that I can customize individual oneOf-elements as you wrote, but I would really like to add a heading at the oneOf-level, just above the individual checkboxes. Is there a way to do that?

Screen Shot 2022-10-24 at 15.26.00 2

I’m sorry if my original post was unclear.