mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
fix issues with deleting of reorderable array items
This commit is contained in:
@@ -276,19 +276,15 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
||||
*/
|
||||
updateForm(sectionData: WorkspaceitemSectionFormObject, errors: SubmissionSectionError[]): void {
|
||||
|
||||
if (isNotEmpty(sectionData) && !isEqual(sectionData, this.sectionData.data)) {
|
||||
if (hasValue(sectionData) && !isEqual(sectionData, this.sectionData.data)) {
|
||||
this.sectionData.data = sectionData;
|
||||
if (this.hasMetadataEnrichment(sectionData)) {
|
||||
this.isUpdating = true;
|
||||
this.formModel = null;
|
||||
this.cdr.detectChanges();
|
||||
this.initForm(sectionData);
|
||||
this.checksForErrors(errors);
|
||||
this.isUpdating = false;
|
||||
this.cdr.detectChanges();
|
||||
} else if (isNotEmpty(errors) || isNotEmpty(this.sectionData.errors)) {
|
||||
this.checksForErrors(errors);
|
||||
}
|
||||
this.isUpdating = true;
|
||||
this.formModel = null;
|
||||
this.cdr.detectChanges();
|
||||
this.initForm(sectionData);
|
||||
this.checksForErrors(errors);
|
||||
this.isUpdating = false;
|
||||
this.cdr.detectChanges();
|
||||
} else if (isNotEmpty(errors) || isNotEmpty(this.sectionData.errors)) {
|
||||
this.checksForErrors(errors);
|
||||
}
|
||||
|
Reference in New Issue
Block a user