bug fix on question preview of description template editor

This commit is contained in:
CITE\spapacharalampous 2024-08-27 13:34:58 +03:00
parent 98086a9225
commit 4850b9e838
1 changed files with 3 additions and 2 deletions

View File

@ -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) {