Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oneOf with array do not load data correctly #449

Closed
jma opened this issue Sep 30, 2021 · 0 comments
Closed

oneOf with array do not load data correctly #449

jma opened this issue Sep 30, 2021 · 0 comments
Labels
bug Something isn't working, but not critical

Comments

@jma
Copy link
Contributor

jma commented Sep 30, 2021

Describe the issue
When a oneOf contains an array with minItems the editor do not load existing data correctly.

To Reproduce

Try the editor with the given JSONSchema:

{
  "schema": {
    "type": "object",
    "oneOf": [
      {
        "title": "Boolean",
        "properties": {
          "bool": {
            "title": "Bool",
            "type": "boolean"
          }
        },
        "required": ["bool"]
      },
      {
        "title": "List",
        "properties": {
          "list": {
            "title": "List",
            "type": "array",
            "minItems": 1,
            "items": {
              "title": "Item",
              "type": "string"
            }
          }
        },
        "required": ["ipsum"]
      }
    ]
  },
  "model": {
    "list": ["test"]
  }
}

Expected behavior
The list should be selected on the editor load.

Note: This problem correspond to an ngx-formly issue: ngx-formly/ngx-formly#3059.

@PascalRepond PascalRepond added the bug Something isn't working, but not critical label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, but not critical
Projects
None yet
Development

No branches or pull requests

2 participants