Skip to content

Array of (Enum or other) not working properly #107

@alphatownsman

Description

@alphatownsman

If the schema is organized as following, all const options are incorrectly mapped to the previous one.

{
  "type": "array",
  "title": "Languages",
  "items": {
    "oneOf": [
      {"const": "en","title": "English"},
      {"const": "fr","title": "French"},
      {"const": "zh","title": "Chinese"},
      {"title": "Other","type": "string"}
    ]
  },
  "uniqueItems":true
}

by moving {"title": "Other","type": "string"} to be the first element, it solves the mapping, but loses the ability to greyout/readonly the text input while selecting a const

{
  "type": "array",
  "title": "Languages",
  "items": {
    "oneOf": [
      {"title": "Other","type": "string"},
      {"const": "en","title": "English"},
      {"const": "fr","title": "French"},
      {"const": "zh","title": "Chinese"}
    ]
  },
  "uniqueItems":true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions