Skip to content

Required property is not set if field is conditionally required #1390

Open
@sasmangulyan-vineti

Description

@sasmangulyan-vineti

Describe the bug
When making the specific field required based on some condition the required property is still false.

To Reproduce
Steps to reproduce the behavior:

  1. Schema contains something conditional
    { type: "object", properties: { b: { type: "boolean" }, c: { type: "string", minLength: 1 } }, if: { properties: { b: { enum: [false] } } }, then: { required: ["c"] } }
  2. When making the "b" from true to false (for example checking and unchecking the box), required property of ''c'' which has the renderer of MaterialInputControl will not be changed and will remain false.

Expected behavior
After a conditional action the required property of MaterialInputControl to become true.

Browser (please complete the following information):

  • Chrome 74.0.3729.157 (Official Build) (64-bit)
  • Firefox 66.0.5 (64-bit)

Used Setup (please complete the following information):

  • react
  • material

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions