From fdb47604f75312b02d215741b81eacf1aff9bd32 Mon Sep 17 00:00:00 2001 From: chenzeyu Date: Wed, 27 Mar 2024 10:26:57 +0800 Subject: [PATCH] =?UTF-8?q?BI-146095=20fix=EF=BC=9A=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=8A=A0=E8=BD=BD=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E7=BC=93=E5=AD=98=E6=97=B6cachegroup=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/widget/multiselect/loader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/fineui/src/widget/multiselect/loader.js b/packages/fineui/src/widget/multiselect/loader.js index 933c96e43..589b205e7 100644 --- a/packages/fineui/src/widget/multiselect/loader.js +++ b/packages/fineui/src/widget/multiselect/loader.js @@ -74,7 +74,7 @@ export class MultiSelectInnerLoader extends Widget { this.next.setLoaded(); const items = this._composeItems(this.cachItems.slice(0, 100)); this.cachItems = this.cachItems.slice(100); - this.addItems(items); + this.addItems(items, true); return; } @@ -183,7 +183,7 @@ export class MultiSelectInnerLoader extends Widget { ]); } - addItems(items) { + addItems(items, isFromCache = false) { this.count += items.length; if (isObject(this.next)) { if (this.hasNext()) { @@ -194,7 +194,7 @@ export class MultiSelectInnerLoader extends Widget { } } // cacheGroup渲染的是全量的,如果这次加载更多add的items是从cacheItems里面拿的,那不用再add了 - if (this.cachItems.length > 0) { + if (isFromCache) { this.button_group.addItems(...arguments); return; }