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 editing a field in oneOf/anyOf property and then switching to the other schema, the formData still keeps the old property but as undefined. This causes issues when submitting the form and the schema has set additionalProperties: false. Here is a simple rjsf playground and example schema:
The function sanitizeDataForNewSchema is where the old formData fields are set to undefined. I think a simple solution would be to filter out all undefined fields after all the logic in sanitizeDataForNewSchema is done.
Expected Behavior
When switching to other schema it would clear out any old fields.
Steps To Reproduce
No response
Environment
- OS:
- Node:
- npm:
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
What theme are you using?
core
Version
5.x
Current Behavior
When editing a field in oneOf/anyOf property and then switching to the other schema, the formData still keeps the old property but as undefined. This causes issues when submitting the form and the schema has set
additionalProperties: false
. Here is a simple rjsf playground and example schema:The function
sanitizeDataForNewSchema
is where the old formData fields are set to undefined. I think a simple solution would be to filter out all undefined fields after all the logic in sanitizeDataForNewSchema is done.Expected Behavior
When switching to other schema it would clear out any old fields.
Steps To Reproduce
No response
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: