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 { RestResponse } from '../../../core/cache/response.models';
|
||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
import { tap } from 'rxjs/internal/operators/tap';
|
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({
|
@Component({
|
||||||
selector: 'ds-item-move',
|
selector: 'ds-item-move',
|
||||||
@@ -44,6 +46,8 @@ export class ItemMoveComponent implements OnInit {
|
|||||||
itemId: string;
|
itemId: string;
|
||||||
processing = false;
|
processing = false;
|
||||||
|
|
||||||
|
pagination = new PaginationComponentOptions();
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
@@ -58,6 +62,7 @@ export class ItemMoveComponent implements OnInit {
|
|||||||
this.itemId = rd.payload.id;
|
this.itemId = rd.payload.id;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
this.pagination.pageSize = 5;
|
||||||
this.loadSuggestions('');
|
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.
|
* TODO: When the API support it, only fetch collections where user has ADD rights to.
|
||||||
*/
|
*/
|
||||||
loadSuggestions(query): void {
|
loadSuggestions(query): void {
|
||||||
this.collectionSearchResults = this.searchService.search(new SearchOptions({
|
this.collectionSearchResults = this.searchService.search(new PaginatedSearchOptions({
|
||||||
|
pagination: this.pagination,
|
||||||
dsoType: DSpaceObjectType.COLLECTION,
|
dsoType: DSpaceObjectType.COLLECTION,
|
||||||
query: query
|
query: query
|
||||||
})).pipe(
|
})).pipe(
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
(keydown.arrowup)="shiftFocusUp($event)" (keydown.esc)="close()"
|
(keydown.arrowup)="shiftFocusUp($event)" (keydown.esc)="close()"
|
||||||
(dsClickOutside)="close();">
|
(dsClickOutside)="close();">
|
||||||
<input #inputField type="text" [(ngModel)]="value" [name]="name"
|
<input #inputField type="text" [(ngModel)]="value" [name]="name"
|
||||||
class="form-control suggestion_input"
|
class="form-control suggestion_input mb-2"
|
||||||
[ngClass]="{'is-invalid': !valid}"
|
[ngClass]="{'is-invalid': !valid}"
|
||||||
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
||||||
[placeholder]="placeholder"
|
[placeholder]="placeholder"
|
||||||
|
Reference in New Issue
Block a user