tuain-ng-forms-lib 14.0.16 → 14.0.17
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.
|
@@ -1269,7 +1269,7 @@ class RecordTable extends FormElement {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
notifyGetDataAction(requestedPage = null) {
|
|
1271
1271
|
this.updateVisibleRecords();
|
|
1272
|
-
this.requestedPage = requestedPage || this.currentPage;
|
|
1272
|
+
this.requestedPage = requestedPage || this.currentPage || 1;
|
|
1273
1273
|
const tableEvent = {
|
|
1274
1274
|
tableCode: this.tableCode,
|
|
1275
1275
|
actionCode: null,
|
|
@@ -1334,7 +1334,7 @@ class RecordTable extends FormElement {
|
|
|
1334
1334
|
const recordsLastPage = this.totalRecordsNumber % this.recordsPerPage;
|
|
1335
1335
|
const totalPages = this.totalRecordsNumber / this.recordsPerPage + (recordsLastPage ? 1 : 0);
|
|
1336
1336
|
if (this.currentPage > totalPages) {
|
|
1337
|
-
this.currentPage = totalPages;
|
|
1337
|
+
this.currentPage = totalPages || 1;
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
else {
|
|
@@ -1348,7 +1348,7 @@ class RecordTable extends FormElement {
|
|
|
1348
1348
|
this.visible = tableReceived?.visible || true;
|
|
1349
1349
|
this.totalPages = tableReceived.totalPages || 1;
|
|
1350
1350
|
this.recordsNumber = tableReceived.recordsNumber;
|
|
1351
|
-
this.setAttr('currentPage', +tableReceived?.currentPage
|
|
1351
|
+
this.setAttr('currentPage', +tableReceived?.currentPage || 1);
|
|
1352
1352
|
this.setAttr('recordsPerPage', +tableReceived.recordsPerPage);
|
|
1353
1353
|
this.setAttr('totalRecordsNumber', (this.clientPaging) ? tableReceived.tableRecords.length : +tableReceived.totalRecordsNumber);
|
|
1354
1354
|
this.setAttr('sorting', {
|