Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omitExtraData/liveOmit doesn't work with dynamic/conditional schemas #2720

Closed
nickgros opened this issue Feb 18, 2022 · 3 comments
Closed

omitExtraData/liveOmit doesn't work with dynamic/conditional schemas #2720

nickgros opened this issue Feb 18, 2022 · 3 comments
Labels
bug duplicate issue This issue is a duplicate of another one if-then-else Issues related to handling JSON Schema if/then/else

Comments

@nickgros
Copy link
Contributor

By adding support for conditional logic in schemas (#2700), schemas can now be dynamic. Because of this, it's possible for a user to enter data in a field, and afterwards conditional logic in the form can cause the field to no longer exist, or cause the data to no longer be shown in the form due to a type incompatibility. I would expect omitExtraData and liveOmit to handle this, but that doesn't seem to be the case.

In cases where the field no longer exists, the data will appear under additionalProperties if permitted by the schema. This is desirable under my use case, where I do not want to lose user data, so I'd like to preserve this behavior when omitExtraData and liveOmit are false.

@nickgros nickgros added the bug label Feb 18, 2022
@ksbrar
Copy link

ksbrar commented Jun 14, 2022

bump

1 similar comment
@dxdc
Copy link

dxdc commented Nov 19, 2022

bump

@nickgros
Copy link
Contributor Author

nickgros commented Mar 1, 2024

Closing in favor of #4109 since that one has a playground example

@nickgros nickgros closed this as completed Mar 1, 2024
@nickgros nickgros added the duplicate issue This issue is a duplicate of another one label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug duplicate issue This issue is a duplicate of another one if-then-else Issues related to handling JSON Schema if/then/else
Projects
None yet
Development

No branches or pull requests

3 participants