Rjsf-team from React-jsonschema-form Repository

Apache License 2.0

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

Issue Opened
Nickgros Opened Issue On Oct 5th 2022, 3:13

Nickgros

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

Comment
Nickgros commented on 2 months ago

Nickgros

Looks like the change happened in ObjectField in the TypeScript conversion: https://github.com/rjsf-team/react-jsonschema-form/commit/f7a2affe39a604b8aa6766dc36d54074a9b0b41d

About Repository

A React component for building Web forms from JSON Schema.
Language: TypeScript
Star: 12070
Fork: 1990
Watchers: 12070
Open Issues: 388
https://github.com/rjsf-team/react-jsonschema-form
Apache License 2.0
Last updated: 05 Dec 2022
Tropics: