@shival99/z-ui 1.2.37 → 1.2.38
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.
|
@@ -3115,7 +3115,7 @@ class ZTableComponent {
|
|
|
3115
3115
|
if (!cacheLoaded && (leftPinned.length > 0 || rightPinned.length > 0)) {
|
|
3116
3116
|
this.columnPinning.set({ left: leftPinned, right: rightPinned });
|
|
3117
3117
|
}
|
|
3118
|
-
}
|
|
3118
|
+
});
|
|
3119
3119
|
explicitEffect([this.zConfig], ([cfg]) => {
|
|
3120
3120
|
if (cfg.enableRowPinning && !this.hasBodyRowSpan()) {
|
|
3121
3121
|
const cols = cfg.columns ?? [];
|
|
@@ -3158,10 +3158,21 @@ class ZTableComponent {
|
|
|
3158
3158
|
this.pagination.set(configPagination);
|
|
3159
3159
|
}
|
|
3160
3160
|
});
|
|
3161
|
-
explicitEffect([this.columnFilters, this.globalFilter, this.pagination, this.sorting], () => {
|
|
3161
|
+
explicitEffect([this.columnFilters, this.globalFilter, this.pagination, this.sorting, this._data], () => {
|
|
3162
3162
|
queueMicrotask(() => {
|
|
3163
3163
|
this._checkVerticalScroll();
|
|
3164
3164
|
this._checkHorizontalScroll();
|
|
3165
|
+
if (this.isVirtual()) {
|
|
3166
|
+
this._dynamicGroupsVersion.update(v => v + 1);
|
|
3167
|
+
}
|
|
3168
|
+
});
|
|
3169
|
+
});
|
|
3170
|
+
explicitEffect([this.virtualizer.getVirtualItems], () => {
|
|
3171
|
+
if (!this.isVirtual()) {
|
|
3172
|
+
return;
|
|
3173
|
+
}
|
|
3174
|
+
queueMicrotask(() => {
|
|
3175
|
+
this._checkLastRowTouchesBottom();
|
|
3165
3176
|
});
|
|
3166
3177
|
});
|
|
3167
3178
|
explicitEffect([this.zLoading, this.isProcessing], () => {
|
|
@@ -3316,6 +3327,29 @@ class ZTableComponent {
|
|
|
3316
3327
|
this.lastRowTouchesBottom.set(true);
|
|
3317
3328
|
return;
|
|
3318
3329
|
}
|
|
3330
|
+
if (this.isVirtual()) {
|
|
3331
|
+
const virtualScrollInner = tbodyWrapperEl.querySelector('.z-virtual-scroll-inner');
|
|
3332
|
+
if (!virtualScrollInner) {
|
|
3333
|
+
this.lastRowTouchesBottom.set(true);
|
|
3334
|
+
return;
|
|
3335
|
+
}
|
|
3336
|
+
const virtualRows = virtualScrollInner.querySelectorAll('.z-virtual-row');
|
|
3337
|
+
if (virtualRows.length === 0) {
|
|
3338
|
+
this.lastRowTouchesBottom.set(true);
|
|
3339
|
+
return;
|
|
3340
|
+
}
|
|
3341
|
+
const lastVirtualRow = virtualRows[virtualRows.length - 1];
|
|
3342
|
+
const lastTr = lastVirtualRow.querySelector('tbody tr:last-child');
|
|
3343
|
+
if (!lastTr) {
|
|
3344
|
+
this.lastRowTouchesBottom.set(true);
|
|
3345
|
+
return;
|
|
3346
|
+
}
|
|
3347
|
+
const wrapperRect = tbodyWrapperEl.getBoundingClientRect();
|
|
3348
|
+
const rowRect = lastTr.getBoundingClientRect();
|
|
3349
|
+
const gap = wrapperRect.bottom - rowRect.bottom;
|
|
3350
|
+
this.lastRowTouchesBottom.set(gap <= 2);
|
|
3351
|
+
return;
|
|
3352
|
+
}
|
|
3319
3353
|
const tbody = tbodyWrapperEl.querySelector('tbody');
|
|
3320
3354
|
if (!tbody) {
|
|
3321
3355
|
this.lastRowTouchesBottom.set(true);
|