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

oneOf/anyOf does not infer type or respect subschema-level type #1654

Closed
3 tasks done
epicfaace opened this issue Mar 16, 2020 · 1 comment · Fixed by #3392 or #3414
Closed
3 tasks done

oneOf/anyOf does not infer type or respect subschema-level type #1654

epicfaace opened this issue Mar 16, 2020 · 1 comment · Fixed by #3392 or #3414
Labels

Comments

@epicfaace
Copy link
Member

Prerequisites

Description

Explicitly giving the type in a root-level schema works fine.

However, the following do not render anything, though are supposed to still render a dropdown:

Version

2.0.0-alpha.2

@Saulzi
Copy link
Contributor

Saulzi commented Mar 17, 2020

@epicfaace saw this happening the other day, it looks like there is some code to detect but this is not working, I have a few examples of this on what I am currently working on which also requires #885 / my if then else stuff

@epicfaace epicfaace added this to To do in PRs May 23, 2020
@newt10 newt10 added multiSchema and removed oneof labels Sep 3, 2021
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 30, 2023
…#3412

Fixes: rjsf-team#3412 by reverting the last change made to `getSchemaType()`

The type inference from `anyOf`/`oneOf` that was added to fix rjsf-team#1654 actually caused a worse bug, and without it the inference now happens properly due to other fixes somehow

- In `@rjsf/utils`, reverted the type inference from `anyOf`/`oneOf`
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Jan 30, 2023
Fixes: #3412 by reverting the last change made to `getSchemaType()`

The type inference from `anyOf`/`oneOf` that was added to fix #1654 actually caused a worse bug, and without it the inference now happens properly due to other fixes somehow

- In `@rjsf/utils`, reverted the type inference from `anyOf`/`oneOf`
- Updated the `CHANGELOG.md` accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants