diff --git a/dist/other/rjsf/templates/ArrayFieldTemplate.js b/dist/other/rjsf/templates/ArrayFieldTemplate.js index 41e0172..1a86970 100644 --- a/dist/other/rjsf/templates/ArrayFieldTemplate.js +++ b/dist/other/rjsf/templates/ArrayFieldTemplate.js @@ -16,8 +16,7 @@ export default function ArrayFieldTemplate(props) { return (React.createElement(Stack, { spacing: 1, className: "ArrayFieldTemplate" }, React.createElement(ArrayFieldTitleTemplate, { idSchema: idSchema, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, required: required, registry: registry }), React.createElement(ArrayFieldDescriptionTemplate, { idSchema: idSchema, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), - items && - items.map(({ key, ...itemProps }) => (React.createElement(ArrayFieldItemTemplate, { key: key, ...itemProps }))), + items ? (React.createElement(Stack, { spacing: 1, className: "ArrayFieldTemplateItems" }, items.map(({ key, ...itemProps }) => (React.createElement(ArrayFieldItemTemplate, { key: key, ...itemProps }))))) : null, canAdd && (React.createElement(Grid, { container: true, justifyContent: "flex-end" }, React.createElement(Grid, { item: true }, React.createElement(Box, { mt: 2 }, diff --git a/src/other/rjsf/templates/ArrayFieldTemplate.tsx b/src/other/rjsf/templates/ArrayFieldTemplate.tsx index fcb43a0..eb81712 100644 --- a/src/other/rjsf/templates/ArrayFieldTemplate.tsx +++ b/src/other/rjsf/templates/ArrayFieldTemplate.tsx @@ -70,10 +70,15 @@ export default function ArrayFieldTemplate< uiSchema={uiSchema} registry={registry} /> - {items && - items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType) => ( - - ))} + + {items ? ( + + {items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType) => ( + + ))} + + ) : null} + {canAdd && (