Skip to content

The extraErrors is not showing the first time set with array field + form data #4982

@fangpenlin

Description

@fangpenlin

Prerequisites

What theme are you using?

daisyui

Version

6.4.1

Current Behavior

The issue #4965 has already been addressed. Thank you so much for fixing. However, I tested it a bit more, there's still a corner case having same issue.

With an array field, I add a number, then try to submit. In the submit callback, I set extraError directly. It acts like #4965, the first extraError update won't trigger the form rendering error, only the second one does. And this only appear when I have formData controled by outside.

Expected Behavior

The first extraError update should work

Steps To Reproduce

Created a branch from my last reproducing repo here:

https://github.com/fangpenlin/react-jsonschema-form-extra-error-bug-reproduce/tree/array-field

The codesandbox repo can also be found here:

https://codesandbox.io/p/github/fangpenlin/react-jsonschema-form-extra-error-bug-reproduce/csb-4ljmky/draft/distracted-waterfall

Environment

- OS:
- Node:
- npm:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triageInitial label given, to be assigned correct labels and assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions