Skip to content

ArrayFieldItemTemplate errors are not getting resetting on remove and new addition  #4435

@DharamveerYadav

Description

@DharamveerYadav

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

Currently error messages are not getting reset for ArrayFieldItemTemplate, If I have done validation and do removal and new addition.

Expected Behavior

Error messages should reset.

Steps To Reproduce

  1. go to this playground
{
  "definitions": {
    "Thing": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "default": "Default name"
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "listOfStrings": {
      "type": "array",
      "title": "A list of strings",
      "items": {
        "type": "string"
      }
    }
  }
}
  1. add new row and click on validate
image
  1. now remove the last array item.
image
  1. Add new item again.
image

Ideally error message should not come again, if this is a new row. Basically schema is containing errors and not resetting remove and add operation.

Environment

- OS:
- Node:
- npm:

Anything else?

https://rjsf-team.github.io/react-jsonschema-form/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions