From 6b1e74790bb2b960cd2f074fd5401dfad030b8d9 Mon Sep 17 00:00:00 2001 From: Tsanie Lily Date: Fri, 12 Jul 2024 14:57:06 +0800 Subject: [PATCH] . --- lib/ui/grid/grid.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ui/grid/grid.js b/lib/ui/grid/grid.js index b5be07e..1193c41 100644 --- a/lib/ui/grid/grid.js +++ b/lib/ui/grid/grid.js @@ -3537,7 +3537,13 @@ export class Grid { } } - _topToIndex(top) { + /** + * @private + * @param {number} top + * @param {boolean} [reload] + * @returns {number} + */ + _topToIndex(top, reload) { const rowHeight = (this.rowHeight + 1); top -= (top % (rowHeight * 2)) + (RedumCount * rowHeight); if (top < 0) { @@ -3561,7 +3567,7 @@ export class Grid { * @returns {number} */ _scrollToTop(top, reload) { - const tti = this._topToIndex(top); + const tti = this._topToIndex(top, reload); top = tti.top; if (this._var.scrollTop !== top) { this._var.scrollTop = top;