-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Unable to input formData for oneOf while omitExtraData and liveOmit is set to true #2262
Comments
Same here... Which is a problem since shared fields are not resetting with anyOf/oneOf without this option. See #1819 |
The problem seems to be coming from here: fieldNames is It looks like changing |
Looking into it more it looks like the -toPathSchema() ignores the properties contained in oneOf |
@maksymt1 hi, Do you use omitextradata and liveomit to delete extra form data values that are not in the form fields? |
Hi @xyy7260 we are hitting this issue as well and yes, we are using omitextradata and liveomit to delete extra form data values that are not in the form fields. |
Fixes: rjsf-team#2262 - Updated `@rjsf/utils` to update the `toPathSchema()` method to pick the closest matching option for `oneOf`/`anyOf` choices to render a path schema for it - Updated test to maintain 100% coverage - Updated `@rjsf/core` to cache retrieved options in state for use in the rest of the component - Also improved enumOptions to output better labels for options without them when a title is available in either the `schema` or `uiSchema` - Added tests to validate both fixes - Updated the `CHANGELOG.md` accordingly
* fix: Reimplement 2548 to fix 2262 Fixes: #2262 - Updated `@rjsf/utils` to update the `toPathSchema()` method to pick the closest matching option for `oneOf`/`anyOf` choices to render a path schema for it - Updated test to maintain 100% coverage - Updated `@rjsf/core` to cache retrieved options in state for use in the rest of the component - Also improved enumOptions to output better labels for options without them when a title is available in either the `schema` or `uiSchema` - Added tests to validate both fixes - Updated the `CHANGELOG.md` accordingly * Apply suggestions from code review - Accepted reviewer suggestions Co-authored-by: Nick Grosenbacher <nickgrosenbacher@gmail.com> Co-authored-by: Nick Grosenbacher <nickgrosenbacher@gmail.com>
Prerequisites
Description
Unable to input formData for oneOf while omitExtraData and liveOmit is set to true
ex: https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6e30sInNjaGVtYSI6eyJ0eXBlIjoib2JqZWN0Iiwib25lT2YiOlt7InByb3BlcnRpZXMiOnsibG9yZW0iOnsidHlwZSI6InN0cmluZyJ9fSwicmVxdWlyZWQiOlsibG9yZW0iXX0seyJwcm9wZXJ0aWVzIjp7Imlwc3VtIjp7InR5cGUiOiJzdHJpbmcifX0sInJlcXVpcmVkIjpbImlwc3VtIl19XX0sInVpU2NoZW1hIjp7fSwidGhlbWUiOiJkZWZhdWx0IiwibGl2ZVNldHRpbmdzIjp7InZhbGlkYXRlIjpmYWxzZSwiZGlzYWJsZSI6ZmFsc2UsIm9taXRFeHRyYURhdGEiOnRydWUsImxpdmVPbWl0Ijp0cnVlfX0=
Steps to Reproduce
Expected behavior
Data is inputted
Actual behavior
Nothing happens
Version
2.4.2
The text was updated successfully, but these errors were encountered: