From 4a9f2d87f34b4025ee0e8eeeddba755ed919f6be Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 15 Apr 2025 17:46:08 +0300 Subject: [PATCH] UI: Fixed saving issue in dynamic form array item of type 'fieldset' --- ui-ngx/src/app/shared/models/dynamic-form.models.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui-ngx/src/app/shared/models/dynamic-form.models.ts b/ui-ngx/src/app/shared/models/dynamic-form.models.ts index d807e7b13b..4132eeff94 100644 --- a/ui-ngx/src/app/shared/models/dynamic-form.models.ts +++ b/ui-ngx/src/app/shared/models/dynamic-form.models.ts @@ -181,15 +181,15 @@ export const cleanupFormProperty = (property: FormProperty): FormProperty => { if (property.type !== FormPropertyType.textarea) { delete property.rows; } - if (property.type !== FormPropertyType.fieldset) { - delete property.properties; - } else if (property.properties?.length) { - property.properties = cleanupFormProperties(property.properties); - } if (property.type !== FormPropertyType.array) { delete property.arrayItemName; delete property.arrayItemType; } + if (property.type !== FormPropertyType.fieldset && property.arrayItemType !== FormPropertyType.fieldset) { + delete property.properties; + } else if (property.properties?.length) { + property.properties = cleanupFormProperties(property.properties); + } if (property.type !== FormPropertyType.select) { delete property.multiple; delete property.allowEmptyOption;