Browse Source

Merge pull request #239192 in DEC/fineui from master to feature/x

* commit 'da60173b2ead4419d5ac89643d0b21e73f8ed5b2':
  BI-128988 fix: 【来源PT项目】文本过滤组件文本列表勾选状态异常
research/test
superman 1 year ago
parent
commit
73932b3f57
  1. 21
      packages/fineui/src/widget/multiselect/loader.js

21
packages/fineui/src/widget/multiselect/loader.js

@ -192,6 +192,11 @@ export class MultiSelectInnerLoader extends Widget {
this.next.setEnd(); this.next.setEnd();
} }
} }
// cacheGroup渲染的是全量的,如果这次加载更多add的items是从cacheItems里面拿的,那不用再add了
if (this.cachItems.length > 0) {
this.button_group.addItems(...arguments);
return;
}
const renderEngine = Widget._renderEngine; const renderEngine = Widget._renderEngine;
Widget.registerRenderEngine(Element.renderEngine); Widget.registerRenderEngine(Element.renderEngine);
this.cachGroup.addItems(...arguments); this.cachGroup.addItems(...arguments);
@ -220,13 +225,6 @@ export class MultiSelectInnerLoader extends Widget {
this.times = 1; this.times = 1;
this.count = 0; this.count = 0;
this.count += items.length; this.count += items.length;
if (isObject(this.next)) {
if (this.hasNext()) {
this.next.setLoaded();
} else {
this.next.invisible();
}
}
return true; return true;
} }
@ -243,6 +241,15 @@ export class MultiSelectInnerLoader extends Widget {
this.cachGroup.populate.call(this.cachGroup, items, keyword); this.cachGroup.populate.call(this.cachGroup, items, keyword);
Widget.registerRenderEngine(renderEngine); Widget.registerRenderEngine(renderEngine);
this.button_group.populate.call(this.button_group, items.slice(0, firstItemsCount), keyword); this.button_group.populate.call(this.button_group, items.slice(0, firstItemsCount), keyword);
// hasNext依赖的是cacheItems计算,所以从_populate挪到populate里面
if (isObject(this.next)) {
if (this.hasNext()) {
this.next.setLoaded();
} else {
this.next.invisible();
}
}
} }
} }

Loading…
Cancel
Save