PaginatorFix
parent
58ab58e051
commit
687df00bb2
|
|
@ -220,8 +220,8 @@
|
||||||
<div *ngIf="this.showNoResultsError && this.languageService.language =='EN'"><h2>The search did not return any results</h2></div>
|
<div *ngIf="this.showNoResultsError && this.languageService.language =='EN'"><h2>The search did not return any results</h2></div>
|
||||||
<!-- [filterSettings]="filterSettings" -->
|
<!-- [filterSettings]="filterSettings" -->
|
||||||
|
|
||||||
<mat-paginator *ngIf="renderGantt" #paginator
|
<mat-paginator #paginator
|
||||||
[ngStyle]="{'visibility':spin ? 'hidden' : 'visible'}"
|
[ngStyle]="{'visibility':renderGantt ? 'visible' : 'hidden'}"
|
||||||
class="demo-paginator"
|
class="demo-paginator"
|
||||||
(page)="handlePageEvent($event)"
|
(page)="handlePageEvent($event)"
|
||||||
[length]="this.dataService.getTotalSize()"
|
[length]="this.dataService.getTotalSize()"
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,8 @@ export class NttGanttComponent implements OnInit {
|
||||||
public sortSelectorName: any;
|
public sortSelectorName: any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public presets : any[] = [];
|
public presets : any[] = [];
|
||||||
public selectedPreset: Preset = {id: 'test', name : 'test', presetType: 'test', definition: {}};
|
public selectedPreset: Preset = {id: 'test', name : 'test', presetType: 'test', definition: {}};
|
||||||
public presetControl: FormControl = new FormControl('');;
|
public presetControl: FormControl = new FormControl('');;
|
||||||
|
|
@ -660,10 +662,12 @@ export class NttGanttComponent implements OnInit {
|
||||||
* @param e pageEvent from the matpaginator
|
* @param e pageEvent from the matpaginator
|
||||||
*/
|
*/
|
||||||
public handlePageEvent(e: PageEvent):void {
|
public handlePageEvent(e: PageEvent):void {
|
||||||
|
console.log("Index: "+e.pageIndex+" x "+ "Size: "+e.pageSize + " = "+ e.pageSize*e.pageIndex);
|
||||||
let start = e.pageSize*e.pageIndex;
|
let start = e.pageSize*e.pageIndex;
|
||||||
let end = start+ e.pageSize;
|
let end = start+ e.pageSize;
|
||||||
this.sliceStart = start;
|
this.sliceStart = start;
|
||||||
this.sliceEnd = end;
|
this.sliceEnd = end;
|
||||||
|
|
||||||
console.log(this.sliceStart);
|
console.log(this.sliceStart);
|
||||||
console.log(this.sliceEnd);
|
console.log(this.sliceEnd);
|
||||||
this.refreshData();
|
this.refreshData();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue