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

Nested if/then/else not initializing correctly #3872

Open
4 tasks done
nBerg opened this issue Sep 19, 2023 · 2 comments
Open
4 tasks done

Nested if/then/else not initializing correctly #3872

nBerg opened this issue Sep 19, 2023 · 2 comments
Labels
dependencies help wanted if-then-else Issues related to handling JSON Schema if/then/else

Comments

@nBerg
Copy link

nBerg commented Sep 19, 2023

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

Nested if/then behavior isn't initializing correctly

Example playground

The initial render has "animal" as blank and the dependent fields don't show up until Cat or Fish is selected.
Once you select "Cat", the dependent field "food" shows up, but also "kind" and "favorite" show up, even though I don't expect them to.
Once you select something from the food dropdown, the correct field disappears and the behavior is again as expected, until you select the empty option from the "food" dropdown.

Expected Behavior

Nested "then" properties would only show up once the "if" condition is met.

Steps To Reproduce

  1. Example playground
  2. Select "Cat"
  3. Notice "kind" and "favorite" both appear, even though they should only appear based on the selection of the "food" dropdown

Environment

- OS:
- Node:
- npm:

Anything else?

No response

@nBerg nBerg added bug needs triage Initial label given, to be assigned correct labels and assigned labels Sep 19, 2023
@asifurrahaman754
Copy link

I would like work on this, can anyone assign me?

@heath-freenome
Copy link
Member

@asifurrahaman754 go ahead and pick this up and provide a PR. You don't really need to be assigned

@heath-freenome heath-freenome added help wanted dependencies if-then-else Issues related to handling JSON Schema if/then/else and removed bug needs triage Initial label given, to be assigned correct labels and assigned labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies help wanted if-then-else Issues related to handling JSON Schema if/then/else
Projects
None yet
Development

No branches or pull requests

3 participants