mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Resolve field instance models using index when filtering errors
(cherry picked from commit d218e22944
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
f8c6a80fbe
commit
036dba942d
@@ -232,7 +232,7 @@ export class FormComponent implements OnDestroy, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (field) {
|
if (field) {
|
||||||
const model: DynamicFormControlModel = this.formBuilderService.findById(fieldId, formModel);
|
const model: DynamicFormControlModel = this.formBuilderService.findById(fieldId, formModel, fieldIndex);
|
||||||
this.formService.addErrorToField(field, model, error.message);
|
this.formService.addErrorToField(field, model, error.message);
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ export class FormComponent implements OnDestroy, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (field) {
|
if (field) {
|
||||||
const model: DynamicFormControlModel = this.formBuilderService.findById(fieldId, formModel);
|
const model: DynamicFormControlModel = this.formBuilderService.findById(fieldId, formModel, fieldIndex);
|
||||||
this.formService.removeErrorFromField(field, model, error.message);
|
this.formService.removeErrorFromField(field, model, error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user