diff --git a/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts b/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts index 09ac2ab37..93894f918 100644 --- a/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts +++ b/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts @@ -196,10 +196,11 @@ export class DescriptionTemplateEditorFieldSetComponent extends BaseComponent im } const descriptionEditorModel = new DescriptionEditorModel().fromModel(mockDescription, mockDescription.descriptionTemplate); - this.previewPropertiesFormGroup = descriptionEditorModel.properties.fieldSets.get(fieldSet.id).buildForm({visibilityRulesService: this.visibilityRulesService}) as UntypedFormGroup; + const previewProperties = descriptionEditorModel.properties.buildForm({visibilityRulesService: this.visibilityRulesService}) as UntypedFormGroup; + this.previewPropertiesFormGroup = previewProperties.get("fieldSets").get(fieldSet.id) as UntypedFormGroup; this.previewFieldSet = fieldSet; - this.visibilityRulesService.setContext(mockDescription.descriptionTemplate.definition, this.previewPropertiesFormGroup); + this.visibilityRulesService.setContext(mockDescription.descriptionTemplate.definition, previewProperties); } onIsMultiplicityEnabledChange(isMultiplicityEnabled: MatCheckboxChange) {