rjsf-team/react-jsonschema-form

Conditional property is not added to the form if its type conflicts with `additionalProperties`

Geschlossen

#3.178 geöffnet am 05.10.2022

 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (2.136 Forks)batch import
additionalPropertiesbughelp wantedif-then-else

Repository-Metriken

Stars
 (13.175 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 3T 17h) (32 gemergte PRs in 30 T)

Beschreibung

Prerequisites

What theme are you using?

core

Version

5.0.0-beta.10

Current Behavior

My schema should add a "string" field but it only does so when additionalProperties is

  • undefined
  • true (this is not a real workaround because of #3179)
  • `{ "type": "string" }

This warning is logged to the console when the field should be added:

could not merge subschemas in allOf:
Error: Could not resolve values for path:"properties.state.type". They are probably incompatible. Values: 
"string"
"number"

Expected Behavior

The conditional field should appear - I should be able to customize additionalProperties and have conditional fields that do not match the additionalProperties schema.

Steps To Reproduce

Link to reproduction in current playground

Environment

Playground 5.0.0-beta.10

Anything else?

No response

Contributor Guide