@acorex/data-grid 3.0.62 → 3.0.65
Sign up to get free protection for your applications and to get access to all the features.
- package/acorex-data-grid.metadata.json +1 -1
- package/bundles/acorex-data-grid.umd.js +29 -14
- package/bundles/acorex-data-grid.umd.js.map +1 -1
- package/bundles/acorex-data-grid.umd.min.js +1 -1
- package/bundles/acorex-data-grid.umd.min.js.map +1 -1
- package/esm2015/lib/data-grid/datagrid.component.js +30 -15
- package/esm5/lib/data-grid/datagrid.component.js +30 -15
- package/fesm2015/acorex-data-grid.js +29 -14
- package/fesm2015/acorex-data-grid.js.map +1 -1
- package/fesm5/acorex-data-grid.js +29 -14
- package/fesm5/acorex-data-grid.js.map +1 -1
- package/lib/data-grid/datagrid.component.d.ts +6 -1
- package/package.json +1 -1
@@ -864,6 +864,8 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
864
864
|
this.sizeColumnsToFit = true;
|
865
865
|
this.showCheckBox = true;
|
866
866
|
this.floatingFilter = false;
|
867
|
+
// @Input()
|
868
|
+
// takeCount: number;
|
867
869
|
this.autoGroupColumnDef = {};
|
868
870
|
this.selectionMode = 'single';
|
869
871
|
// @Input()
|
@@ -894,6 +896,15 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
894
896
|
this.isServerSideGroup = function (e) {
|
895
897
|
return e[_this.hasChildField];
|
896
898
|
};
|
899
|
+
this.getColumnDefs = function () {
|
900
|
+
return _this.gridApi.getColumnDefs();
|
901
|
+
};
|
902
|
+
this.getCurrentPageNumber = function () {
|
903
|
+
return {
|
904
|
+
current: _this.gridApi.paginationGetCurrentPage() + 1,
|
905
|
+
total: _this.gridApi.paginationGetTotalPages()
|
906
|
+
};
|
907
|
+
};
|
897
908
|
this.getServerSideGroupKey = function (e) {
|
898
909
|
return e[_this.keyField];
|
899
910
|
};
|
@@ -1007,7 +1018,8 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1007
1018
|
loadParams.searchText = that.searchText;
|
1008
1019
|
loadParams.skip = params.request.startRow;
|
1009
1020
|
// loadParams.take = params.request.endRow - params.request.startRow;
|
1010
|
-
loadParams.take = that.takeCount ? that.takeCount : params.api.paginationGetPageSize() * 2;
|
1021
|
+
//// loadParams.take = that.takeCount ? that.takeCount : params.api.paginationGetPageSize() * 2;
|
1022
|
+
loadParams.take = params.request.endRow - params.request.startRow;
|
1011
1023
|
loadParams.sort = params.request.sortModel.map(function (c) {
|
1012
1024
|
return {
|
1013
1025
|
field: c.colId,
|
@@ -1023,7 +1035,10 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1023
1035
|
parentData: params.parentNode.data
|
1024
1036
|
};
|
1025
1037
|
loadParams.filter = params.request.filterModel;
|
1038
|
+
debugger;
|
1039
|
+
/// setTimeout(() => {
|
1026
1040
|
that.dataSource.fetch(loadParams);
|
1041
|
+
// }, 5000);
|
1027
1042
|
}
|
1028
1043
|
};
|
1029
1044
|
},
|
@@ -1036,12 +1051,15 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1036
1051
|
AXDataGridComponent.prototype.ngOnDestroy = function () {
|
1037
1052
|
this.gridApi.destroy();
|
1038
1053
|
};
|
1054
|
+
AXDataGridComponent.prototype.paginationGoToPage = function (number) {
|
1055
|
+
this.gridApi.paginationGoToPage(number - 1);
|
1056
|
+
};
|
1039
1057
|
// todo gridOptions: GridOptions
|
1040
1058
|
AXDataGridComponent.prototype.internalGridReady = function (gridOptions) {
|
1041
|
-
gridOptions.api.checkGridSize();
|
1042
|
-
this.takeCount = this.takeCount ? this.takeCount : gridOptions.api.paginationGetPageSize() * 2;
|
1059
|
+
//// gridOptions.api.checkGridSize();
|
1060
|
+
//// this.takeCount = this.takeCount ? this.takeCount : gridOptions.api.paginationGetPageSize() * 2;
|
1043
1061
|
// this.takeCount = this.takeCount < 20 ? 20 : this.takeCount;
|
1044
|
-
gridOptions.api.gridOptionsWrapper.setProperty('cacheBlockSize', this.takeCount);
|
1062
|
+
//// gridOptions.api.gridOptionsWrapper.setProperty('cacheBlockSize', this.takeCount);
|
1045
1063
|
this.gridApi = gridOptions.api;
|
1046
1064
|
this.mapColumns();
|
1047
1065
|
this.calcHeight();
|
@@ -1076,11 +1094,11 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1076
1094
|
//this.cdr
|
1077
1095
|
};
|
1078
1096
|
AXDataGridComponent.prototype.ngOnInit = function () {
|
1079
|
-
if (this.takeCount && this.takeCount > 0) {
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
}
|
1097
|
+
// if (this.takeCount && this.takeCount > 0) {
|
1098
|
+
// this.paginationPageSize = this.takeCount;
|
1099
|
+
// this.paginationAutoPageSize = false;
|
1100
|
+
// this.cacheBlockSize = this.takeCount;
|
1101
|
+
// }
|
1084
1102
|
if (this.selectionMode === 'single') {
|
1085
1103
|
this.groupSelectsChildren = false;
|
1086
1104
|
}
|
@@ -1172,6 +1190,7 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1172
1190
|
//});
|
1173
1191
|
this.enabelSelect = true;
|
1174
1192
|
this.dataSource.onDataReceived.subscribe(function (_data) {
|
1193
|
+
debugger;
|
1175
1194
|
var result = _data.data.result;
|
1176
1195
|
_this.hideLoading();
|
1177
1196
|
var items;
|
@@ -1376,7 +1395,7 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1376
1395
|
if (e.clientWidth > 0 && e.clientHeight > 0) {
|
1377
1396
|
this.performSizeColumnsToFit(e.api);
|
1378
1397
|
}
|
1379
|
-
this.refresh();
|
1398
|
+
// this.refresh();
|
1380
1399
|
// this.gridApi.paginationGoToFirstPage();
|
1381
1400
|
};
|
1382
1401
|
AXDataGridComponent.prototype.internalGridFirstDataRendered = function (e) {
|
@@ -1419,10 +1438,6 @@ var AXDataGridComponent = /** @class */ (function () {
|
|
1419
1438
|
Input(),
|
1420
1439
|
__metadata("design:type", Boolean)
|
1421
1440
|
], AXDataGridComponent.prototype, "floatingFilter", void 0);
|
1422
|
-
__decorate([
|
1423
|
-
Input(),
|
1424
|
-
__metadata("design:type", Number)
|
1425
|
-
], AXDataGridComponent.prototype, "takeCount", void 0);
|
1426
1441
|
__decorate([
|
1427
1442
|
Input(),
|
1428
1443
|
__metadata("design:type", String)
|