@shival99/z-ui 1.7.11 → 1.7.12
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.
|
@@ -3693,6 +3693,7 @@ class ZTableComponent {
|
|
|
3693
3693
|
});
|
|
3694
3694
|
explicitEffect([this.columnFilters, this.globalFilter, this.pagination, this.sorting, this._data], () => {
|
|
3695
3695
|
if (this.isVirtual()) {
|
|
3696
|
+
// Reset scroll position synchronously
|
|
3696
3697
|
const wrapperEl = this.tbodyWrapper()?.nativeElement;
|
|
3697
3698
|
if (wrapperEl) {
|
|
3698
3699
|
wrapperEl.scrollTop = 0;
|
|
@@ -3701,14 +3702,14 @@ class ZTableComponent {
|
|
|
3701
3702
|
if (scrollbar) {
|
|
3702
3703
|
void scrollbar.scrollTo({ top: 0, duration: 0 });
|
|
3703
3704
|
}
|
|
3705
|
+
// Reset virtualizer to offset 0
|
|
3704
3706
|
this.virtualizer.scrollToOffset(0);
|
|
3707
|
+
// Force recalculate dynamic groups immediately
|
|
3708
|
+
this._dynamicGroupsVersion.update(v => v + 1);
|
|
3705
3709
|
}
|
|
3706
3710
|
queueMicrotask(() => {
|
|
3707
3711
|
this._checkVerticalScroll();
|
|
3708
3712
|
this._checkHorizontalScroll();
|
|
3709
|
-
if (this.isVirtual()) {
|
|
3710
|
-
this._dynamicGroupsVersion.update(v => v + 1);
|
|
3711
|
-
}
|
|
3712
3713
|
});
|
|
3713
3714
|
});
|
|
3714
3715
|
explicitEffect([this.virtualizer.getVirtualItems], () => {
|
|
@@ -3729,12 +3730,18 @@ class ZTableComponent {
|
|
|
3729
3730
|
}
|
|
3730
3731
|
return;
|
|
3731
3732
|
}
|
|
3733
|
+
// Loading finished - reset scroll positions
|
|
3732
3734
|
queueMicrotask(() => {
|
|
3733
3735
|
const wrapperEl = this.tbodyWrapper()?.nativeElement;
|
|
3734
3736
|
if (wrapperEl) {
|
|
3735
3737
|
wrapperEl.scrollTop = 0;
|
|
3736
3738
|
wrapperEl.scrollLeft = this._savedScrollLeft();
|
|
3737
3739
|
}
|
|
3740
|
+
// Critical: Reset virtualizer when loading finishes in server mode
|
|
3741
|
+
if (this.isVirtual()) {
|
|
3742
|
+
this.virtualizer.scrollToOffset(0);
|
|
3743
|
+
this._dynamicGroupsVersion.update(v => v + 1);
|
|
3744
|
+
}
|
|
3738
3745
|
this._checkScrollState();
|
|
3739
3746
|
});
|
|
3740
3747
|
});
|