tuain-ng-forms-lib 12.0.59 → 12.0.60

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.
@@ -716,10 +716,18 @@
716
716
  LibTableComponent.prototype.tableGlobalAction = function (actionCode) { this.table.notifyGlobalAction(actionCode); };
717
717
  LibTableComponent.prototype.tableSelectionAction = function (actionCode) { this.table.notifySelectionAction(actionCode); };
718
718
  LibTableComponent.prototype.tableActionSelected = function (actionEvent) { this.table.notifyInlineAction(actionEvent); };
719
- LibTableComponent.prototype.changePage = function (requestedPage) { !this.clientPaging && this.table.notifyGetDataAction(requestedPage); };
720
719
  LibTableComponent.prototype.tableSelectionToggle = function (recordId) { this.table.notifyRecordSelection(recordId); };
721
720
  LibTableComponent.prototype.toggleSelectAll = function () { return (this.allSelected) ? this.table.unSelectAll() : this.table.selectAll(); };
722
721
  LibTableComponent.prototype.globalFilterCompleted = function () { this.changePage(1); };
722
+ LibTableComponent.prototype.changePage = function (requestedPage) {
723
+ if (this.clientPaging) {
724
+ this.currentPage = requestedPage;
725
+ this.updateTableView();
726
+ }
727
+ else {
728
+ this.table.notifyGetDataAction(requestedPage);
729
+ }
730
+ };
723
731
  LibTableComponent.prototype.syncAttribute = function (name, value) {
724
732
  try {
725
733
  // this.hasOwnProperty(name)
@@ -1786,12 +1794,7 @@
1786
1794
  this.recordsNumber = tableReceived.recordsNumber;
1787
1795
  this.setAttr('currentPage', (_a = +(tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.currentPage)) !== null && _a !== void 0 ? _a : 1);
1788
1796
  this.setAttr('recordsPerPage', +tableReceived.recordsPerPage);
1789
- if (this.clientPaging) {
1790
- this.setAttr('totalRecordsNumber', +tableReceived.tableRecords.length);
1791
- }
1792
- else {
1793
- this.setAttr('totalRecordsNumber', +tableReceived.totalRecordsNumber);
1794
- }
1797
+ this.setAttr('totalRecordsNumber', (this.clientPaging) ? tableReceived.tableRecords.length : +tableReceived.totalRecordsNumber);
1795
1798
  this.setAttr('sorting', {
1796
1799
  columnName: tableReceived.sortingColumn || '',
1797
1800
  direction: tableReceived.sortingDirection || ''