Browse Source

Pull request #241403: BI-128437 提交Final fix: 【来源PT项目】BI绑定参数文本下拉问题

Merge in DEC/fineui from ~DAILER/fineui-decision:final/11.0 to final/11.0

* commit '1102e4c5716690aa3add593de24f8894591a3fc2':
  BI-128437  提交Final fix: 【来源PT项目】BI绑定参数文本下拉问题
research/test
Dailer-刘荣歆 1 year ago
parent
commit
f3e5ce5858
  1. 14
      src/widget/multiselect/loader.js

14
src/widget/multiselect/loader.js

@ -51,7 +51,8 @@ BI.MultiSelectInnerLoader = BI.inherit(BI.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;
}
@ -170,6 +171,17 @@ BI.MultiSelectInnerLoader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments);
},
_composeItems: function (items) {
const cacheValue = this.cachGroup.getValue();
return items.map(item => {
return {
...item,
selected: cacheValue.includes(item.value || item.id)
};
});
},
_populate: function (items) {
var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {

Loading…
Cancel
Save