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 not using given data #472

Open
ibot3 opened this issue Jan 9, 2025 · 0 comments
Open

oneOf not using given data #472

ibot3 opened this issue Jan 9, 2025 · 0 comments

Comments

@ibot3
Copy link
Contributor

ibot3 commented Jan 9, 2025

When using a oneOf structure to select different schemas, the given data value is not used by the form.

This for example applies to the oneOf example here:

type: object
title: An object with a oneOf
oneOfLayout:
  label: Select a subschema
oneOf:
  - title: oneOf 1
    required:
      - str1
    properties:
      key:
        const: oneOf1
      str1:
        type: string
  - title: oneOf 2
    required:
      - str2
    properties:
      key:
        const: oneOf2
      str2:
        type: string

When key is changed, the change is not reflected in the form, instead the "key" field stays empty.
This makes it impossible to use this form schema in a scenario where given data should be edited.

This behavior can also be observed in the editor available on the docs page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant