eclipsesource / eclipsesource/jsonforms
Arrays are displayed in list form, and enumeration values cannot define 'integer'?
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 424
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Description
### Describe the bug
When displaying data in array format with a single line, if the field is "integer" and the data source uses oneOf to define enumeration, the dropdown box cannot be displayed on the list. Instead, the numeric adjuster is displayed, and it cannot be displayed in the form of a dropdown box.
But testing found that defining it as a "string" type can be effective
### Expected behavior
Display in dropdown format
### Steps to reproduce the issue
1、json
` uploadDataAccess: [
{
value: true,
level: 1,
......
},
]`
2、schema
` "uploadDataAccess": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "boolean"
},
"level": {
"type": "integer",
"$ref": "#/$defs/levelOptions"
}
},
"required": ["name", "value", "level"]
}
}`
` "$defs": {
"levelOptions": {
"type": "integer",
"oneOf": [
{
"const": 1,
"title": "one"
},
{
"const": 2,
"title": "two"
}
]
}
}`
3、uischema
` {
"type": "Group",
"elements": [
{
"type": "Control",
"scope": "#/properties/uploadDataAccess",
"options": {
"format": "array"
}
}
]
}`
### Screenshots

### Which Version of JSON Forms are you using?
3.5.1
### Package
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.