You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
Description
A schema may define a set of objects as properties. A subset of those properties may be required by the schema. Currently react-jsonschema-form expands all objects (required or not). It would save space to collapse objects not required and provide a button to add the object if desired. Additionally, if the unrequired object has required fields when present, the validator will require the required fields in the unrequired object be filled in (even though they are only required when the object exists).
Ideally, string 1 and object 1 would be displayed and object 2 would be collapsed so everything below it was not shown. String 3 would not be required because no object 2 had been created.
Actual behavior
All properties and subproperties are shown. String 3 is required even though object 2 is empty.
Version
0.48.2
The text was updated successfully, but these errors were encountered:
Hi, thanks for your comment. I agree that this would be useful. We've had a longstanding wishlist item for collapsing fields or hiding them (#322/#324, #578, your own #598). I would be interested in reviewing a PR that added this feature if it could be done in a clean way.
Uh oh!
There was an error while loading. Please reload this page.
Prerequisites
Description
A schema may define a set of objects as properties. A subset of those properties may be required by the schema. Currently react-jsonschema-form expands all objects (required or not). It would save space to collapse objects not required and provide a button to add the object if desired. Additionally, if the unrequired object has required fields when present, the validator will require the required fields in the unrequired object be filled in (even though they are only required when the object exists).
Steps to Reproduce
sample JSFiddle
Expected behavior
Ideally, string 1 and object 1 would be displayed and object 2 would be collapsed so everything below it was not shown. String 3 would not be required because no object 2 had been created.
Actual behavior
All properties and subproperties are shown. String 3 is required even though object 2 is empty.
Version
0.48.2
The text was updated successfully, but these errors were encountered: