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

$ref with anyOf does not load correct Option #2202

Closed
3 tasks done
SimonKlausLudwig opened this issue Jan 21, 2021 · 1 comment
Closed
3 tasks done

$ref with anyOf does not load correct Option #2202

SimonKlausLudwig opened this issue Jan 21, 2021 · 1 comment
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug core

Comments

@SimonKlausLudwig
Copy link

Prerequisites

Description

I have a schema where I have a bunch of definitions which I want to use recursively. Everything works as expected expect if I try to load existing form data. In this case the wrong Option (always the first one) will be selected.

Steps to Reproduce

  1. https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6eyJwZXJzb24iOnsiY2hpbGRyZW4iOltdfSwiY29uZGl0aW9ucyI6W3sicHJlZGljYXRlIjp7ImNvbmRpdGlvbiI6Im5vdF9lcXVhbHMifSwiZmllbGRzIjpbbnVsbF19XSwib3B0aW9ucyI6e30sInZhbHVlc0luRm9ybURhdGEiOnsic2NhbGFyIjoidmFsdWUiLCJhcnJheSI6W3sibmVzdGVkIjoibmVzdGVkIGFycmF5IHZhbHVlIn1dLCJvYmplY3QiOnsibmVzdGVkIjoibmVzdGVkIG9iamVjdCB2YWx1ZSJ9fSwibm9WYWx1ZXNJbkZvcm1EYXRhIjp7InNjYWxhciI6InNjYWxhciBkZWZhdWx0IiwiYXJyYXkiOlt7Im5lc3RlZCI6Im5lc3RlZCBhcnJheSBkZWZhdWx0In0seyJuZXN0ZWQiOiJuZXN0ZWQgYXJyYXkgZGVmYXVsdCJ9XSwib2JqZWN0Ijp7Im5lc3RlZCI6Im5lc3RlZCBvYmplY3QgZGVmYXVsdCJ9fX0sInNjaGVtYSI6eyJkZWZpbml0aW9ucyI6eyJwZXJzb24iOnsidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnsicGVyc29uX25hbWUiOnsidHlwZSI6InN0cmluZyJ9LCJjaGlsZHJlbiI6eyJ0eXBlIjoiYXJyYXkiLCJpdGVtcyI6eyJhbnlPZiI6W3sidGl0bGUiOiJwZXJzb24iLCIkcmVmIjoiIy9kZWZpbml0aW9ucy9wZXJzb24ifSx7InRpdGxlIjoicGV0IiwiJHJlZiI6IiMvZGVmaW5pdGlvbnMvcGV0In1dfSwiZGVmYXVsdCI6W119fX0sInBldCI6eyJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6eyJuYW1lIjp7InR5cGUiOiJzdHJpbmcifSwicmFjZSI6eyJ0eXBlIjoic3RyaW5nIn19fX0sInR5cGUiOiJvYmplY3QiLCJwcm9wZXJ0aWVzIjp7InBlcnNvbiI6eyIkcmVmIjoiIy9kZWZpbml0aW9ucy9wZXJzb24ifX19LCJ1aVNjaGVtYSI6e30sInRoZW1lIjoiYm9vdHN0cmFwLTQiLCJsaXZlU2V0dGluZ3MiOnsidmFsaWRhdGUiOmZhbHNlLCJkaXNhYmxlIjpmYWxzZSwib21pdEV4dHJhRGF0YSI6ZmFsc2UsImxpdmVPbWl0IjpmYWxzZX19

  2. Add children

  3. Select Pet

  4. Give it a name and a race

  5. Try to load the form with the newly created form data and the schema

As you see know the option "person" is now selected and not pet as previously selected.

2.41

@SimonKlausLudwig
Copy link
Author

I tried to find this bug by my own for 6 hours. Can anyone point me into a direction ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug core
Projects
None yet
Development

No branches or pull requests

3 participants