Commit d7a8b3bb0d11e419d92724dfad280ca1015d8af5

Authored by Administrator
2 parents 842485ac 41b1d6bc

Merge remote-tracking branch 'origin/master'

npm-debug.log.742618877 0 → 100644
src/models/statement.base.ts
@@ -39,7 +39,7 @@ export abstract class StatementBase implements AfterViewInit, OnInit { @@ -39,7 +39,7 @@ export abstract class StatementBase implements AfterViewInit, OnInit {
39 data = [this.createModel()]; 39 data = [this.createModel()];
40 } 40 }
41 let lastRow: number = -1; 41 let lastRow: number = -1;
42 - if (data.length <= this.params.endRow && !this.isNew) { 42 + if (data.length < (this.params.endRow - this.params.startRow) && !this.isNew) {
43 lastRow = data.length; 43 lastRow = data.length;
44 } 44 }
45 this.params.successCallback(data, lastRow); 45 this.params.successCallback(data, lastRow);
@@ -76,7 +76,12 @@ export abstract class StatementBase implements AfterViewInit, OnInit { @@ -76,7 +76,12 @@ export abstract class StatementBase implements AfterViewInit, OnInit {
76 this.gridOptions.enableServerSideFilter = true; 76 this.gridOptions.enableServerSideFilter = true;
77 this.showGrid = true; 77 this.showGrid = true;
78 this.gridOptions.rowModelType = 'virtual'; 78 this.gridOptions.rowModelType = 'virtual';
79 - this.gridOptions.paginationPageSize = 25; 79 + this.gridOptions.paginationPageSize = 10;
  80 + this.gridOptions.paginationOverflowSize = 2;
  81 + this.gridOptions.maxPagesInCache = 2;
  82 + this.gridOptions.getRowNodeId = function(item) {
  83 + return item.id;
  84 + };
80 } 85 }
81 86
82 protected bootstrapGrid(): void { 87 protected bootstrapGrid(): void {
src/services/statement.base.service.ts
@@ -29,7 +29,7 @@ export abstract class StatementBaseService { @@ -29,7 +29,7 @@ export abstract class StatementBaseService {
29 sort = this.parseSort(params.sortModel[0]); 29 sort = this.parseSort(params.sortModel[0]);
30 } 30 }
31 let url: string = this.url; 31 let url: string = this.url;
32 - url += '?from=' + params.startRow + '&to=' + params.endRow; 32 + url += '?from=' + params.startRow + '&perPage=' + (params.endRow - params.startRow);
33 if (sort) { 33 if (sort) {
34 url += '&sort=' + sort; 34 url += '&sort=' + sort;
35 } 35 }