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

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

Open
4 tasks done
DharamveerYadav opened this issue Jan 1, 2025 · 0 comments
Open
4 tasks done
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned

Comments

@DharamveerYadav
Copy link

DharamveerYadav commented Jan 1, 2025

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. visit rjsf playground and try array sample
    used JSON: {
    "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"
    }
    }
    }
    }

  2. 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/

@DharamveerYadav DharamveerYadav added bug needs triage Initial label given, to be assigned correct labels and assigned labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned
Projects
None yet
Development

No branches or pull requests

1 participant