mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
Fix margin and amount of returned results
This commit is contained in:
@@ -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(
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user