eclipsesource / eclipsesource/jsonforms
Support 'oneOf' enum titles in array element headers
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 424
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
I am trying to add label to enum fields as described in this commit https://github.com/eclipsesource/jsonforms/commit/432af77ab5db94b24051055f3ceca16a4d5beab9. Its resulting in weird recursive form.
**To Reproduce**
Jsonschema:
```
"loadBalancer": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"threshold",
"duration",
"severity"
],
"properties": {
// 3 other elements as in screenshot
"severity": {
"type": "string",
"oneOf": [
{"const": "foo", "title": "Foo"},
{"const": "bar", "title": "Bar"}
],
"default": "foo"
}
}
}
},
```
UISchema:
```
{
"type": "Control",
"scope": "#/properties/deployment/properties/alerts/properties/loadBalancer",
"label": "LoadBalancer alerts",
"options": {
"detail": {
"type": "VerticalLayout",
"elements": [
// 3 other elements as in screenshot
{
"type": "Control",
"scope": "#/properties/severity"
}
]
}
}
```
**Expected behavior**
Expected to show usual dropdown with different title and value
**Screenshots**
Foo, Bar instead of coming as drop down are coming as category fields. And in these categories, my whole form is again inside.

**Browser (please complete the following information):**
- Browser [Firefox]
- Version [79.0]
**Used Setup (please complete the following information):**
- Framework: [react]
- RendererSet: [material]
**Additional context**
The said enum field is a field contained in array of objects, thats why I am using `options->detail`.
Contributor guide
Assessment
This issue has not been assessed yet.