diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html index c577641a4a..d6fb04647c 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html @@ -20,6 +20,19 @@ + + + + + + diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.html index 508765bb42..9fdd8d7b4f 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.html @@ -1,4 +1,10 @@ - +
+ \ No newline at end of file + [config]="initialPagination" + > +
\ No newline at end of file diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts index 56c8a382e8..c2b851a52d 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts @@ -1,9 +1,14 @@ -import { Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { SEARCH_CONFIG_SERVICE } from '../../../../../../+my-dspace-page/my-dspace-page.component'; import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service'; import { Observable } from 'rxjs'; import { RelationshipOptions } from '../../../models/relationship-options.model'; import { ListableObject } from '../../../../../object-collection/shared/listable-object.model'; +import { RemoteData } from '../../../../../../core/data/remote-data'; +import { map, take } from 'rxjs/operators'; +import { createSuccessfulRemoteDataObject } from '../../../../../testing/utils'; +import { PaginationComponentOptions } from '../../../../../pagination/pagination-component-options.model'; +import { PaginatedList } from '../../../../../../core/data/paginated-list'; @Component({ selector: 'ds-dynamic-lookup-relation-selection-tab', @@ -24,10 +29,19 @@ export class DsDynamicLookupRelationSelectionTabComponent { @Input() itemRD$; @Input() repeatable: boolean; @Input() selection$: Observable; + @Input() selectionRD$: Observable>>; + initialPagination = Object.assign(new PaginationComponentOptions(), { + id: 'submission-relation-list', + pageSize: 5 + }); - constructor( - - ) { + constructor() { } + ngOnInit() { + this.selectionRD$ = this.selection$.pipe( + take(1), + map((selection) => createSuccessfulRemoteDataObject(new PaginatedList({} as any, selection))) + ); + } } \ No newline at end of file diff --git a/src/app/shared/object-list/object-list.component.html b/src/app/shared/object-list/object-list.component.html index 98f9040a01..cd6671edbc 100644 --- a/src/app/shared/object-list/object-list.component.html +++ b/src/app/shared/object-list/object-list.component.html @@ -10,7 +10,7 @@ (sortDirectionChange)="onSortDirectionChange($event)" (sortFieldChange)="onSortFieldChange($event)" (paginationChange)="onPaginationChange($event)"> -
    +