Browse Source
Merge pull request #13214 from vvlladd28/bug/denamic-form/type-fieldset-array
Fix saving issue for dynamic form array items of type 'fieldset'
pull/13228/head
Igor Kulikov
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
5 deletions
-
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; |
|
|
|
|