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

oneOf nested objects/arrays with default values not using default values after changing between oneOf's

Open nowifi4u opened this issue 9 months ago • 2 comments

Prerequisites

What theme are you using?

core

Version

5.24.2

Current Behavior

Nested objects, arrays and arrays of objects in oneOf objects are not using default values set to them when changing to another oneOf object.

Expected Behavior

Default values should be applied to nested objects, arrays, arrays of objects when switching from one oneOf to another.

Steps To Reproduce

  1. Open this react-jsonschema-form playground link
  2. Change between different oneOf's (Test1, Test2, Test3)
  3. Fields arr, runner and runners should be updating when changing between the oneOf's

Environment

- OS: Windows 10, Ubuntu 20.04, 22.04, 24.04
- Node: 22.12.0, 20.12.2
- npm: 10.9.0

Anything else?

No response

nowifi4u avatar Jan 31 '25 21:01 nowifi4u

@nowifi4u Looking forward to seeing the fix you are working on for this

heath-freenome avatar Feb 07 '25 21:02 heath-freenome

We have the same problem when trying to change initial multi selection values in dependant editors

Lonli-Lokli avatar May 13 '25 20:05 Lonli-Lokli