mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
[CST-4506] Fix item access condition remove operation
This commit is contained in:
@@ -3,4 +3,5 @@
|
|||||||
[formModel]="formModel"
|
[formModel]="formModel"
|
||||||
[displaySubmit]="false"
|
[displaySubmit]="false"
|
||||||
[displayCancel]="false"
|
[displayCancel]="false"
|
||||||
(dfChange)="onChange($event)"></ds-form>
|
(dfChange)="onChange($event)"
|
||||||
|
(removeArrayItem)="onRemove($event)"></ds-form>
|
||||||
|
@@ -222,6 +222,17 @@ export class SubmissionSectionAccessesComponent extends SectionModelComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called when a form removeArrayItem event is fired.
|
||||||
|
* Dispatch remove form operations based on changes.
|
||||||
|
*/
|
||||||
|
onRemove(event: DynamicFormControlEvent) {
|
||||||
|
const fieldIndex = this.formOperationsService.getArrayIndexFromEvent(event);
|
||||||
|
const fieldPath = 'accessConditions/' + fieldIndex;
|
||||||
|
|
||||||
|
this.operationsBuilder.remove(this.pathCombiner.getPath(fieldPath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unsubscribe from all subscriptions
|
* Unsubscribe from all subscriptions
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user