Skip to content

Dependencies are not checked upon adding new element to an array #1653

@Xarthisius

Description

@Xarthisius

When a new element in an array is created its dependencies are not evaluated.

Steps to reproduce

Using this schema:

{
  "definitions": {
    "measurement": {
      "type": "object",
      "properties": {
        "key": {"type": "string"},
        "value": {"type": "string"},
        "optional": {
          "type": "string", 
          "options": {
            "dependencies": { "root.toggle": true }
          }
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "array": {
      "type": "array",
      "items": {"$ref": "#/definitions/measurement"}
    },
    "toggle": {
      "type": "boolean",
      "format": "checkbox",
      "default": false
    }
  }
}

add a new item to array while toggle is unchecked.

Expected results:

New item in array is created without optional field showing

Actual results:

New item in array contains optional field.

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions