cx 26.3.6 → 26.3.8
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 +10 -5
- package/dist/manifest.js +765 -765
- package/dist/widgets.js +8 -3
- package/package.json +1 -1
- package/src/widgets/grid/Grid.scss +657 -690
- package/src/widgets/grid/Grid.tsx +4269 -4264
package/dist/widgets.js
CHANGED
|
@@ -15813,6 +15813,7 @@ class GridComponent extends VDOM.Component {
|
|
|
15813
15813
|
this.end = end;
|
|
15814
15814
|
this.loadingStartPage = 0;
|
|
15815
15815
|
this.loadingEndPage = 0;
|
|
15816
|
+
this.lastSorters = props.data.sorters;
|
|
15816
15817
|
}
|
|
15817
15818
|
this.scrollerRef = (el) => {
|
|
15818
15819
|
this.dom.scroller = el;
|
|
@@ -16446,6 +16447,7 @@ class GridComponent extends VDOM.Component {
|
|
|
16446
16447
|
pageRecords.forEach((page) => {
|
|
16447
16448
|
if (Array.isArray(page)) {
|
|
16448
16449
|
records.push(...page);
|
|
16450
|
+
lastPage = records.length < pageSize;
|
|
16449
16451
|
} else {
|
|
16450
16452
|
if (!Array.isArray(page.records))
|
|
16451
16453
|
throw new Error(
|
|
@@ -16460,13 +16462,16 @@ class GridComponent extends VDOM.Component {
|
|
|
16460
16462
|
let { data } = this.props;
|
|
16461
16463
|
if (!isNumber(totalRecordCount)) {
|
|
16462
16464
|
totalRecordCount = (startPage - 1) * pageSize + records.length;
|
|
16463
|
-
if (!lastPage
|
|
16464
|
-
|
|
16465
|
+
if (!lastPage) {
|
|
16466
|
+
if (records.length == (endPage - startPage + 1) * pageSize) totalRecordCount++;
|
|
16467
|
+
if (data.totalRecordCount > totalRecordCount) totalRecordCount = data.totalRecordCount;
|
|
16468
|
+
}
|
|
16465
16469
|
}
|
|
16466
16470
|
instance.buffer.totalRecordCount = data.totalRecordCount = totalRecordCount;
|
|
16467
16471
|
instance.buffer.records = data.records = records;
|
|
16468
16472
|
instance.buffer.page = data.page = startPage;
|
|
16469
16473
|
data.offset = (startPage - 1) * pageSize;
|
|
16474
|
+
data.empty = totalRecordCount == 0;
|
|
16470
16475
|
instance.store.silently(() => {
|
|
16471
16476
|
instance.set("records", records);
|
|
16472
16477
|
instance.set("page", startPage);
|
|
@@ -16485,7 +16490,7 @@ class GridComponent extends VDOM.Component {
|
|
|
16485
16490
|
})
|
|
16486
16491
|
.catch((error) => {
|
|
16487
16492
|
this.loading = false;
|
|
16488
|
-
if (widget.onLoadingError) instance.invoke(
|
|
16493
|
+
if (widget.onLoadingError) instance.invoke("onLoadingError", error, instance);
|
|
16489
16494
|
});
|
|
16490
16495
|
}, 30);
|
|
16491
16496
|
if (startPage < this.loadingStartPage || endPage > this.loadingEndPage) {
|