paginations
This commit is contained in:
parent
6f291aa006
commit
7baa6dcbde
|
@ -1,5 +1,11 @@
|
|||
<h2>Datasource Manager: Results</h2>
|
||||
|
||||
<p>
|
||||
<span *ngIf="field">Searching for <b>{{field}}</b> = <i>"{{value}}"</i></span>
|
||||
<span *ngIf="!field && value">Searching for <i>"{{value}}"</i></span>
|
||||
<span *ngIf="!field && !value">Returning all the datasources</span>
|
||||
</p>
|
||||
|
||||
<mat-paginator (page)="changePage($event)"
|
||||
[pageIndex]="currPage"
|
||||
[pageSize]="pageSize"
|
||||
|
@ -9,7 +15,17 @@
|
|||
aria-label="Select page">
|
||||
</mat-paginator>
|
||||
|
||||
|
||||
<div *ngFor="let ds of results">
|
||||
{{ds.name}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-paginator (page)="changePage($event)"
|
||||
[pageIndex]="currPage"
|
||||
[pageSize]="pageSize"
|
||||
[length]="nResults"
|
||||
[pageSize]="pageSize"
|
||||
[pageSizeOptions]="[10, 25, 50, 100]"
|
||||
aria-label="Select page">
|
||||
</mat-paginator>
|
|
@ -90,8 +90,6 @@ export class DsmResultsComponent implements OnInit {
|
|||
}
|
||||
|
||||
changePage(event: PageEvent) {
|
||||
console.log(event.pageIndex);
|
||||
|
||||
let path = '/dsm/results/' + event.pageIndex + '/' + event.pageSize;
|
||||
let qp = this.field ?
|
||||
{ field: this.field, value: this.value } :
|
||||
|
|
|
@ -134,15 +134,9 @@ export interface Datasource {
|
|||
|
||||
export interface Page<T> {
|
||||
content: T[],
|
||||
last: boolean,
|
||||
first: boolean,
|
||||
totalPages: number,
|
||||
totalElements: number,
|
||||
numberOfElements: number,
|
||||
size: number,
|
||||
number: number,
|
||||
empty:boolean,
|
||||
pageable?:any,
|
||||
sort?:any
|
||||
number: number
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue