react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

onAddClick creating and immediately removing array item

Open AshleyHolton opened this issue 1 year ago • 3 comments

Prerequisites

What theme are you using?

other

Version

5.x

Current Behavior

Hi,

Currently using custom templates and everything works fine, however when I attempt to add a new array element via onAddClick, I see the flash of the item being added and then being immediately removed.

Reordering and delete buttons work fine so the formData is being dealt with correctly. It's just onAddClick that's a problem.

It's also odd that onChange is called 6 times when the button is clicked.

Expected Behavior

A new item should be added to the array and onChange called once.

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

AshleyHolton avatar May 10 '23 20:05 AshleyHolton