rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.12k stars 2.18k forks source link

Form not clearing errors after fixing them #4296

Open igorbrasileiro opened 6 days ago

igorbrasileiro commented 6 days ago

Prerequisites

What theme are you using?

core

Version

5.20.1

Current Behavior

The issue: https://www.loom.com/share/795d1901570a4f8db4030be13e4b4782 After fixing an error in an object inside an array, the errors are not cleared and propagated to other fields.

Expected Behavior

After fixing the error in the form, clean the errors

Steps To Reproduce

  1. Go to rjsf playground
  2. get the schema from this json:
    await fetch('https://htmx.store/live/_meta').then(res => res.json()).then(meta => {
    const schema = meta.schema
    schema.$ref = meta.manifest.blocks.pages['website/pages/Page.tsx'].$ref
    return schema;
    })
  3. get the formData from this json:
    await fetch('https://htmx.store/.decofile').then(res => res.json()).then(blocks => blocks['pages-home-c4bcbfb771e9'])
  4. enable form live validation
  5. go to section-2 > banner > alt required property
  6. clean the field. Will show an error here
  7. type something, to fix the error. The error will be maintained on section-2

Environment

- OS:
- Node:
- npm:

Anything else?

No response

igorbrasileiro commented 6 days ago

How can I share the RJSF playground? I'm clicking on the share button but nothing happens.

heath-freenome commented 4 days ago

How can I share the RJSF playground? I'm clicking on the share button but nothing happens.

@igorbrasileiro after clicking share, the button changes into something that looks like this... Just click the icon that symbolized copy to clipboard and you'll have your link

Screenshot 2024-09-13 at 12 22 46 PM

Once you do that, then can you update the description above with the link?

igorbrasileiro commented 4 days ago

@heath-freenome I tried again now, but after editing the schema and then clicking on the share button I got this error: image image