Fix margin and amount of returned results

This commit is contained in:
Yana De Pauw
2019-08-13 17:44:26 +02:00
parent 1bf9693952
commit 228a61e7ed
2 changed files with 8 additions and 2 deletions

View File

@@ -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(

View File

@@ -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"