diff --git a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts index d964c940f756f11e03ed9741c5e67714097b9ca2..113ee97b3f34076d3e5d81420fa65798c7c92067 100644 --- a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts +++ b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts @@ -18,6 +18,8 @@ import { Observable, of as observableOf } from 'rxjs'; import { RestResponse } from '../../../core/cache/response.models'; import { Collection } from '../../../core/shared/collection.model'; import { tap } from 'rxjs/internal/operators/tap'; +import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; +import { PaginatedSearchOptions } from '../../../+search-page/paginated-search-options.model'; @Component({ selector: 'ds-item-move', @@ -44,6 +46,8 @@ export class ItemMoveComponent implements OnInit { itemId: string; processing = false; + pagination = new PaginationComponentOptions(); + constructor(private route: ActivatedRoute, private router: Router, private notificationsService: NotificationsService, @@ -58,6 +62,7 @@ export class ItemMoveComponent implements OnInit { this.itemId = rd.payload.id; } ); + this.pagination.pageSize = 5; this.loadSuggestions(''); } @@ -74,7 +79,8 @@ export class ItemMoveComponent implements OnInit { * TODO: When the API support it, only fetch collections where user has ADD rights to. */ loadSuggestions(query): void { - this.collectionSearchResults = this.searchService.search(new SearchOptions({ + this.collectionSearchResults = this.searchService.search(new PaginatedSearchOptions({ + pagination: this.pagination, dsoType: DSpaceObjectType.COLLECTION, query: query })).pipe( diff --git a/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.html b/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.html index 016ff8c06cfa62861a3041917c9fbe4f34a52d23..12b5132202336ce161a775a0f3bd74fd44aa65c5 100644 --- a/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.html +++ b/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.html @@ -4,7 +4,7 @@ (keydown.arrowup)="shiftFocusUp($event)" (keydown.esc)="close()" (dsClickOutside)="close();"> <input #inputField type="text" [(ngModel)]="value" [name]="name" - class="form-control suggestion_input" + class="form-control suggestion_input mb-2" [ngClass]="{'is-invalid': !valid}" [dsDebounce]="debounceTime" (onDebounce)="find($event)" [placeholder]="placeholder"