Skip to content

Commit 60d57d3

Browse files
Do not display input field in MultiSchemaField.tsx with null type (#4541)
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
1 parent 91aec38 commit 60d57d3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ should change the heading of the (upcoming) version to include a major version b
2626

2727
- Restricted the chakra-react-select peerDependency to <6.0.0, fixing [#4539](https://github.com/rjsf-team/react-jsonschema-form/issues/4539)
2828

29+
## @rjsf/core
30+
31+
- Do not display input field in MultiSchemaField with null type
32+
2933
## @rjsf/mui
3034

3135
- Fixed issue in BaseInputTemplate where input props were passed to `slotProps.htmlInput`, which does not work in MUI v5.

packages/core/src/components/fields/MultiSchemaField.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ class AnyOfField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends For
241241
readonly={readonly}
242242
/>
243243
</div>
244-
{optionSchema && <_SchemaField {...this.props} schema={optionSchema} uiSchema={optionUiSchema} />}
244+
{optionSchema && optionSchema.type !== 'null' && (
245+
<_SchemaField {...this.props} schema={optionSchema} uiSchema={optionUiSchema} />
246+
)}
245247
</div>
246248
);
247249
}

0 commit comments

Comments
 (0)