- // {componentValueLength === 0 && (
- //
- //
- // {msg => {msg}
}
- //
- //
- // )}
- //
- // {componentValueLength > 0 &&
- // componentValue.map((data, index) => {
- // const key = data.__temp_key__;
- // const isOpen = collapseToOpen === key;
- // const componentFieldName = `${name}.${index}`;
- // const previousComponentTempKey = get(componentValue, [index - 1, '__temp_key__']);
- // const doesPreviousFieldContainErrorsAndIsOpen =
- // componentErrorKeys.includes(`${name}.${index - 1}`) &&
- // index !== 0 &&
- // collapseToOpen === previousComponentTempKey;
-
- // const hasErrors = componentErrorKeys.includes(componentFieldName);
-
- // return (
- // {
- // if (isOpen) {
- // setCollapseToOpen('');
- // } else {
- // setCollapseToOpen(key);
- // }
- // }}
- // parentName={name}
- // schema={componentLayoutData}
- // toggleCollapses={toggleCollapses}
- // />
- // );
- // })}
- //
- //
- // {hasMinError && (
- //
- // 1 ? '.plural' : '.singular'
- // }`
- // )}
- // values={{ count: missingComponentsValue }}
- // />
- //
- // )}
- //
- // );
};
RepeatableComponent.defaultProps = {
@@ -308,7 +191,7 @@ RepeatableComponent.defaultProps = {
formErrors: {},
isNested: false,
max: Infinity,
- // min: -Infinity,
+ min: 0,
};
RepeatableComponent.propTypes = {
@@ -320,7 +203,7 @@ RepeatableComponent.propTypes = {
isNested: PropTypes.bool,
isReadOnly: PropTypes.bool.isRequired,
max: PropTypes.number,
- // min: PropTypes.number,
+ min: PropTypes.number,
name: PropTypes.string.isRequired,
};
diff --git a/packages/core/admin/admin/src/translations/en.json b/packages/core/admin/admin/src/translations/en.json
index a031c480db..5eefcca086 100644
--- a/packages/core/admin/admin/src/translations/en.json
+++ b/packages/core/admin/admin/src/translations/en.json
@@ -461,6 +461,7 @@
"content-manager.components.DynamicZone.ComponentPicker-label": "Pick one component",
"content-manager.components.DynamicZone.add-component": "Add a component to {componentName}",
"content-manager.components.DynamicZone.delete-label": "Delete {name}",
+ "content-manager.components.DynamicZone.error-message": "The component contains error(s)",
"content-manager.components.DynamicZone.missing-components": "There {number, plural, =0 {are # missing components} one {is # missing component} other {are # missing components}}",
"content-manager.components.DynamicZone.move-down-label": "Move component down",
"content-manager.components.DynamicZone.move-up-label": "Move component up",
@@ -481,6 +482,7 @@
"content-manager.components.LeftMenu.single-types": "{number, plural, =0 {Single Types} one {Single Type } other {Single Types}}",
"content-manager.components.LimitSelect.itemsPerPage": "Items per page",
"content-manager.components.NotAllowedInput.text": "No permissions to see this field",
+ "content-manager.components.RepeatableComponent.error-message": "The component(s) contain error(s)",
"content-manager.components.Search.placeholder": "Search for an entry...",
"content-manager.components.Select.draft-info-title": "State: Draft",
"content-manager.components.Select.publish-info-title": "State: Published",