ngx-aur-mat-table 12.2.4 → 12.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngx-aur-mat-table.umd.js +15 -6
- package/bundles/ngx-aur-mat-table.umd.js.map +1 -1
- package/esm2015/lib/model/ColumnConfig.js +1 -1
- package/esm2015/lib/ngx-aur-mat-table.component.js +16 -7
- package/fesm2015/ngx-aur-mat-table.js +15 -6
- package/fesm2015/ngx-aur-mat-table.js.map +1 -1
- package/lib/model/ColumnConfig.d.ts +1 -1
- package/lib/ngx-aur-mat-table.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -995,19 +995,26 @@
|
|
|
995
995
|
// we need this, in order to make pagination work with *ngIf
|
|
996
996
|
NgxAurMatTableComponent.prototype.ngAfterViewInit = function () {
|
|
997
997
|
var _this = this;
|
|
998
|
-
this.
|
|
998
|
+
this.initPaginator();
|
|
999
999
|
this.initSortingDataAccessor();
|
|
1000
1000
|
this.updateColumnOffsets();
|
|
1001
1001
|
this.resizeColumnOffsetsObserver = new ResizeObserver(function () { return _this.updateColumnOffsets(); });
|
|
1002
1002
|
this.resizeColumnOffsetsObserver.observe(this.table.nativeElement);
|
|
1003
1003
|
};
|
|
1004
|
+
NgxAurMatTableComponent.prototype.initPaginator = function () {
|
|
1005
|
+
if (this.tableDataSource) {
|
|
1006
|
+
this.tableDataSource.paginator = this.matPaginator;
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1004
1009
|
NgxAurMatTableComponent.prototype.initSortingDataAccessor = function () {
|
|
1005
1010
|
var _this = this;
|
|
1006
|
-
this.tableDataSource
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
+
if (this.tableDataSource) {
|
|
1012
|
+
this.tableDataSource.sort = this.matSort;
|
|
1013
|
+
this.tableDataSource.sortingDataAccessor = function (data, key) {
|
|
1014
|
+
var customSortFunction = _this.customSortFunctions.get(key);
|
|
1015
|
+
return customSortFunction ? customSortFunction(data, key) : data[key];
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1011
1018
|
};
|
|
1012
1019
|
NgxAurMatTableComponent.prototype.updateColumnOffsets = function () {
|
|
1013
1020
|
var offsets = Array.from(this.table.nativeElement.querySelectorAll('th'))
|
|
@@ -1018,6 +1025,8 @@
|
|
|
1018
1025
|
NgxAurMatTableComponent.prototype.prepareTableData = function () {
|
|
1019
1026
|
this.initTable();
|
|
1020
1027
|
this.initCustomSortFunctionsMap();
|
|
1028
|
+
this.initPaginator();
|
|
1029
|
+
this.initSortingDataAccessor();
|
|
1021
1030
|
this.indexProvider = IndexProvider.create(this.tableConfig)
|
|
1022
1031
|
.addIndexColumn(this.displayedColumns);
|
|
1023
1032
|
this.rowActionsProvider = RowActionProvider.create(this.tableConfig)
|