change detection issue when prefilling a description

This commit is contained in:
Sofia Papacharalampous 2024-06-17 15:45:48 +03:00
parent 5037ca33fa
commit 093de332f3
1 changed files with 2 additions and 1 deletions

View File

@ -166,7 +166,8 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
result.dmpDescriptionTemplate = this.item.dmp.dmpDescriptionTemplates.find(x => x.sectionId == sectionId && x.descriptionTemplateGroupId == result.descriptionTemplate.groupId);
this.prepareForm(result);
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.markForCheck(); // when prefilling a description the "prepareForm" has already being executed from the base-editor and we need to trigger the angular's change-detector manually
this.descriptionFormService.detectChanges(true);
}
})
}