cx 26.3.6 → 26.3.7
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/build/widgets/grid/Grid.d.ts.map +1 -1
- package/build/widgets/grid/Grid.js +9 -5
- package/dist/manifest.js +826 -826
- package/dist/widgets.js +7 -3
- package/package.json +1 -1
- package/src/widgets/grid/Grid.tsx +4268 -4264
package/dist/widgets.js
CHANGED
|
@@ -16446,6 +16446,7 @@ class GridComponent extends VDOM.Component {
|
|
|
16446
16446
|
pageRecords.forEach((page) => {
|
|
16447
16447
|
if (Array.isArray(page)) {
|
|
16448
16448
|
records.push(...page);
|
|
16449
|
+
lastPage = records.length < pageSize;
|
|
16449
16450
|
} else {
|
|
16450
16451
|
if (!Array.isArray(page.records))
|
|
16451
16452
|
throw new Error(
|
|
@@ -16460,13 +16461,16 @@ class GridComponent extends VDOM.Component {
|
|
|
16460
16461
|
let { data } = this.props;
|
|
16461
16462
|
if (!isNumber(totalRecordCount)) {
|
|
16462
16463
|
totalRecordCount = (startPage - 1) * pageSize + records.length;
|
|
16463
|
-
if (!lastPage
|
|
16464
|
-
|
|
16464
|
+
if (!lastPage) {
|
|
16465
|
+
if (records.length == (endPage - startPage + 1) * pageSize) totalRecordCount++;
|
|
16466
|
+
if (data.totalRecordCount > totalRecordCount) totalRecordCount = data.totalRecordCount;
|
|
16467
|
+
}
|
|
16465
16468
|
}
|
|
16466
16469
|
instance.buffer.totalRecordCount = data.totalRecordCount = totalRecordCount;
|
|
16467
16470
|
instance.buffer.records = data.records = records;
|
|
16468
16471
|
instance.buffer.page = data.page = startPage;
|
|
16469
16472
|
data.offset = (startPage - 1) * pageSize;
|
|
16473
|
+
data.empty = totalRecordCount == 0;
|
|
16470
16474
|
instance.store.silently(() => {
|
|
16471
16475
|
instance.set("records", records);
|
|
16472
16476
|
instance.set("page", startPage);
|
|
@@ -16485,7 +16489,7 @@ class GridComponent extends VDOM.Component {
|
|
|
16485
16489
|
})
|
|
16486
16490
|
.catch((error) => {
|
|
16487
16491
|
this.loading = false;
|
|
16488
|
-
if (widget.onLoadingError) instance.invoke(
|
|
16492
|
+
if (widget.onLoadingError) instance.invoke("onLoadingError", error, instance);
|
|
16489
16493
|
});
|
|
16490
16494
|
}, 30);
|
|
16491
16495
|
if (startPage < this.loadingStartPage || endPage > this.loadingEndPage) {
|