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
When omitExtraData is enabled, rjsf drops the value of a nested field for which the identifier contains a dot ., submit. This is unexpected behavior. In case the fields are also required, this leads to failure of form submission down the road. You can see this if you open the example and submit the form right away.
Note that the value of level.1.property seems to not be dropped, so there it works as expected.
Form.getFieldNames gets a list of valid paths, ["dict1.field", "dict.2.field"]
Form.getUsedFormData uses loadash.pick to get values with paths from p.1 from formData
As I understood, we can fix it by making Form.getFieldNames return string[][] instead of string[], lile [["dict1", "field"], ["dict.2", "field"]]
It's valid for loadash.pick sources, but invalid for loadash.pick type annotations @heath-freenome what do you think?
v1ack
added a commit
to v1ack/react-jsonschema-form
that referenced
this issue
Oct 19, 2022
Prerequisites
Description
See playground example
When
omitExtraData
is enabled, rjsf drops the value of a nested field for which the identifier contains a dot.
, submit. This is unexpected behavior. In case the fields are alsorequired
, this leads to failure of form submission down the road. You can see this if you open the example and submit the form right away.Note that the value of
level.1.property
seems to not be dropped, so there it works as expected.Might be related to #2036
Steps to Reproduce
See playground example (same as above)
object
to the schema and anotherobject
as child.required
field with namelevel.2.property
and typestring
to the lower-levelobject
from before.Expected behavior
Form is submitted without errors.
Actual behavior
Form submission fails, field
level.2.property
is marked as required indicating that its value is empty.Version
3.2.1
The text was updated successfully, but these errors were encountered: