eclipsesource / eclipsesource/jsonforms
Wrong key for Array item if specific item is selected
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 424
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Description
### Describe the bug
When I select a single item from an array through the uischema, I get a wrong key.
I think it is because of the items object. If I do the same with a normal object (without items) instead of an array, then I get the expected result.
schema
```
{
"definitions": {
"order": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 5
},
"ordered": {
"type": "boolean"
},
"assignee": {
"type": "string"
},
"choices": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["title"]
}
},
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"$ref": "#/definitions/order",
"format": "html",
"title": "Multi Text Area"
}
}
}
}
```
uischema
```
{
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/orders/items/properties/title"
}
]
}
```
If got the following data:
```
{
"orders": {
"properties": "Test"
}
}
```
### Expected behavior
I expect this output:
```
{
"orders": {
"title": "Test"
}
}
```
### Steps to reproduce the issue
1. clone this repo: [Fankhauser-Dominik/jsonforms-react-seed](https://github.com/Fankhauser-Dominik/jsonforms-react-seed)
2. Play around...
### Screenshots
_No response_
### In which browser are you experiencing the issue?
Not relevant
### Which Version of JSON Forms are you using?
v3.0.0
### Framework
React
### RendererSet
Material
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.