eclipsesource / eclipsesource/jsonforms

Optional enums do not have a blank option

Open
#2,179 1 comment 0 reactions 0 assignees View on GitHub
more information required
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

### Describe the bug

Given the following json schema:

```json
{
"type": "object",
"required": [
"property1"
],
"properties": {
"property1": {
"type": "number"
},
"property2": {
"type": "number"
},
"property3": {
"$ref": "#/definitions/Property3Types"
}
},
"definitions": {
"Property3Types": {
"enum": [
"Type1",
"Type2",
"Type3"
],
"type": "string"
}
},
"additionalProperties": false
}
```

`property3` does not have an option for "nothing".

### Expected behavior

I would expect `property3` to inherently have an option to select "blank", as it is an optional property.

### Steps to reproduce the issue

Use the given json schema to generate a form.

### Screenshots

_No response_

### In which browser are you experiencing the issue?

Brave 1.60.58

### Which Version of JSON Forms are you using?

v3.1.0

### Framework

Core

### RendererSet

Vanilla

### Additional context

Not sure if this is actually a bug, or I am just missing an option to enable this!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.