mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
[DSC-75] Fix issue while deleting multiple qualdrop value
This commit is contained in:
@@ -298,17 +298,14 @@ export class SectionFormOperationsService {
|
||||
event: DynamicFormControlEvent,
|
||||
previousValue: FormFieldPreviousValueObject): void {
|
||||
|
||||
if (event.context && event.context instanceof DynamicFormArrayGroupModel) {
|
||||
// Model is a DynamicRowArrayModel
|
||||
this.handleArrayGroupPatch(pathCombiner, event, (event as any).context.context, previousValue);
|
||||
return;
|
||||
}
|
||||
|
||||
const path = this.getFieldPathFromEvent(event);
|
||||
const value = this.getFieldValueFromChangeEvent(event);
|
||||
console.log(value);
|
||||
if (this.formBuilder.isQualdropGroup(event.model as DynamicFormControlModel)) {
|
||||
this.dispatchOperationsFromMap(this.getQualdropValueMap(event), pathCombiner, event, previousValue);
|
||||
} else if (event.context && event.context instanceof DynamicFormArrayGroupModel) {
|
||||
// Model is a DynamicRowArrayModel
|
||||
this.handleArrayGroupPatch(pathCombiner, event, (event as any).context.context, previousValue);
|
||||
} else if ((isNotEmpty(value) && typeof value === 'string') || (isNotEmpty(value) && value instanceof FormFieldMetadataValueObject && value.hasValue())) {
|
||||
this.operationsBuilder.remove(pathCombiner.getPath(path));
|
||||
}
|
||||
|
Reference in New Issue
Block a user