mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-4506] Fix item access condition remove operation
This commit is contained in:
@@ -3,4 +3,5 @@
|
||||
[formModel]="formModel"
|
||||
[displaySubmit]="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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user