@shival99/z-ui 1.7.6 → 1.7.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.
|
@@ -3693,17 +3693,19 @@ class ZTableComponent {
|
|
|
3693
3693
|
});
|
|
3694
3694
|
explicitEffect([this.columnFilters, this.globalFilter, this.pagination, this.sorting, this._data], () => {
|
|
3695
3695
|
if (this.isVirtual()) {
|
|
3696
|
-
|
|
3696
|
+
// CRITICAL: Reset scroll position SYNCHRONOUSLY before dynamicGroups recomputes
|
|
3697
|
+
// This ensures virtualizer calculates range from offset 0
|
|
3698
|
+
const wrapperEl = this.tbodyWrapper()?.nativeElement;
|
|
3699
|
+
if (wrapperEl) {
|
|
3700
|
+
wrapperEl.scrollTop = 0;
|
|
3701
|
+
}
|
|
3702
|
+
// Force virtualizer to reset measurements and use offset 0
|
|
3703
|
+
this.virtualizer.measure();
|
|
3704
|
+
this.virtualizer.scrollToOffset(0, { align: 'start' });
|
|
3705
|
+
// Now update version to trigger recomputation
|
|
3697
3706
|
this._dynamicGroupsVersion.update(v => v + 1);
|
|
3698
3707
|
}
|
|
3699
3708
|
queueMicrotask(() => {
|
|
3700
|
-
if (this.isVirtual()) {
|
|
3701
|
-
const wrapperEl = this.tbodyWrapper()?.nativeElement;
|
|
3702
|
-
if (wrapperEl) {
|
|
3703
|
-
wrapperEl.scrollTop = 0;
|
|
3704
|
-
}
|
|
3705
|
-
this.virtualizer.scrollToOffset(0);
|
|
3706
|
-
}
|
|
3707
3709
|
this._checkVerticalScroll();
|
|
3708
3710
|
this._checkHorizontalScroll();
|
|
3709
3711
|
});
|