Browse Source

BI-128437 fix: 【来源PT项目】BI绑定参数文本下拉问题

research/test
dailer 1 year ago
parent
commit
00b8eb7be8
  1. 13
      packages/fineui/src/widget/multiselect/loader.js

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

@ -72,7 +72,8 @@ export class MultiSelectInnerLoader extends Widget {
this.next.setLoading();
if (this.cachItems && this.cachItems.length > 0) {
this.next.setLoaded();
this.addItems(this.cachItems.slice(0, 100));
const items = this._composeItems(this.cachItems.slice(0, 100));
this.addItems(items);
this.cachItems = this.cachItems.slice(100);
return;
@ -204,6 +205,16 @@ export class MultiSelectInnerLoader extends Widget {
this.button_group.addItems(...arguments);
}
_composeItems(items) {
const cacheValue = this.cachGroup.getValue();
return items.map(item => {
return {
...item,
selected: cacheValue.includes(item.value || item.id)
};
});
}
_populate(items) {
const self = this,
o = this.options;

Loading…
Cancel
Save