diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts index b8542f5806f..af1de9f3930 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts @@ -41,6 +41,7 @@ import { FieldUpdates } from '../../../../core/data/object-updates/field-updates import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model'; import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface'; import { itemLinksToFollow } from '../../../../shared/utils/relation-query.utils'; +import { RequestParam } from '../../../../core/cache/models/request-param.model'; @Component({ selector: 'ds-edit-relationship-list', @@ -499,15 +500,19 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy { observableCombineLatest([ currentPagination$, this.currentItemIsLeftItem$, + this.relatedEntityType$, ]).pipe( - switchMap(([currentPagination, currentItemIsLeftItem]: [PaginationComponentOptions, boolean]) => - // get the relationships for the current item, relationshiptype and page + switchMap(([currentPagination, currentItemIsLeftItem, relatedEntityType]: [PaginationComponentOptions, boolean, ItemType]) => + // get the relationships for the current page, item, relationship type and related entity type this.relationshipService.getItemRelationshipsByLabel( this.item, currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType, { elementsPerPage: currentPagination.pageSize, - currentPage: currentPagination.currentPage + currentPage: currentPagination.currentPage, + searchParams: [ + new RequestParam('relatedEntityType', relatedEntityType.label), + ], }, false, true,