change detection issue when prefilling a description
This commit is contained in:
parent
5037ca33fa
commit
093de332f3
|
@ -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);
|
result.dmpDescriptionTemplate = this.item.dmp.dmpDescriptionTemplates.find(x => x.sectionId == sectionId && x.descriptionTemplateGroupId == result.descriptionTemplate.groupId);
|
||||||
|
|
||||||
this.prepareForm(result);
|
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);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue