From 0c6cc5fc3da378b35da65638dbbcb604551dee04 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 15 Dec 2021 19:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20debounce?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/list/virtualgrouplist.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/base/list/virtualgrouplist.js b/src/base/list/virtualgrouplist.js index 95ed647e0..aab04efdc 100644 --- a/src/base/list/virtualgrouplist.js +++ b/src/base/list/virtualgrouplist.js @@ -55,18 +55,10 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, { mounted: function () { var self = this, o = this.options; this._populate(); - this._debounceRelease = BI.debounce(function () { - self._scrollLock = false; - }, 30); - this.element.scroll(function (e) { - if (self._scrollLock === true) { - return; - } - self._scrollLock = true; + this.element.scroll(BI.debounce(function (e) { o.scrollTop = self.element.scrollTop(); - self._debounceRelease(); self._calculateBlocksToRender(); - }); + }, 30)); BI.ResizeDetector.addResizeListener(this, function () { self._calculateBlocksToRender(); });