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>
|
||||
<!-- [filterSettings]="filterSettings" -->
|
||||
|
||||
<mat-paginator *ngIf="renderGantt" #paginator
|
||||
[ngStyle]="{'visibility':spin ? 'hidden' : 'visible'}"
|
||||
<mat-paginator #paginator
|
||||
[ngStyle]="{'visibility':renderGantt ? 'visible' : 'hidden'}"
|
||||
class="demo-paginator"
|
||||
(page)="handlePageEvent($event)"
|
||||
[length]="this.dataService.getTotalSize()"
|
||||
|
|
|
|||
|
|
@ -137,6 +137,8 @@ export class NttGanttComponent implements OnInit {
|
|||
public sortSelectorName: any;
|
||||
|
||||
|
||||
|
||||
|
||||
public presets : any[] = [];
|
||||
public selectedPreset: Preset = {id: 'test', name : 'test', presetType: 'test', definition: {}};
|
||||
public presetControl: FormControl = new FormControl('');;
|
||||
|
|
@ -660,10 +662,12 @@ export class NttGanttComponent implements OnInit {
|
|||
* @param e pageEvent from the matpaginator
|
||||
*/
|
||||
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 end = start+ e.pageSize;
|
||||
this.sliceStart = start;
|
||||
this.sliceEnd = end;
|
||||
|
||||
console.log(this.sliceStart);
|
||||
console.log(this.sliceEnd);
|
||||
this.refreshData();
|
||||
|
|
|
|||
Loading…
Reference in New Issue