diff --git a/CHANGELOG.md b/CHANGELOG.md index fd72039559..8613de57f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ should change the heading of the (upcoming) version to include a major version b - Restricted the chakra-react-select peerDependency to <6.0.0, fixing [#4539](https://github.com/rjsf-team/react-jsonschema-form/issues/4539) +## @rjsf/core + +- Do not display input field in MultiSchemaField with null type + ## @rjsf/mui - Fixed issue in BaseInputTemplate where input props were passed to `slotProps.htmlInput`, which does not work in MUI v5. diff --git a/packages/core/src/components/fields/MultiSchemaField.tsx b/packages/core/src/components/fields/MultiSchemaField.tsx index 498713038c..a4e46d5ad0 100644 --- a/packages/core/src/components/fields/MultiSchemaField.tsx +++ b/packages/core/src/components/fields/MultiSchemaField.tsx @@ -241,7 +241,9 @@ class AnyOfField - {optionSchema && <_SchemaField {...this.props} schema={optionSchema} uiSchema={optionUiSchema} />} + {optionSchema && optionSchema.type !== 'null' && ( + <_SchemaField {...this.props} schema={optionSchema} uiSchema={optionUiSchema} /> + )} ); }