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

schema with "oneOf" and default value - acts weird #3977

Closed
4 tasks done
aodinok opened this issue Nov 27, 2023 · 1 comment · Fixed by #4329
Closed
4 tasks done

schema with "oneOf" and default value - acts weird #3977

aodinok opened this issue Nov 27, 2023 · 1 comment · Fixed by #4329
Assignees
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug defaults

Comments

@aodinok
Copy link

aodinok commented Nov 27, 2023

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

When using oneOf in schema with default value you need to select oneOf option twice to actually do the change.
First click removes default value, and second does switch:

Screen.Recording.2023-11-27.at.16.09.44.mov

Playground link

Expected Behavior

Switch should happen after first click

Steps To Reproduce

See playground.

Environment

- OS: MacOS, Chrome
- Node: v20.2.0
- npm: 10.2.4

Anything else?

No response

@aodinok aodinok added bug needs triage Initial label given, to be assigned correct labels and assigned labels Nov 27, 2023
@aodinok aodinok changed the title schema with "oneOf" and nested array acts weird schema with "oneOf" with default value - acts weird Nov 27, 2023
@aodinok aodinok changed the title schema with "oneOf" with default value - acts weird schema with "oneOf" and default value - acts weird Nov 27, 2023
@heath-freenome
Copy link
Member

@aodinok Wow, that is weird. Given that we only have a few volunteers who work a few hours a week on this, do you think you can provide a fix for us?

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 defaults
Projects
None yet
2 participants