Browse Source

BI-117667 fix: 【6.0.5冒烟】数值下拉选择多个选项,查看已选点击加载更多展示重复数据

research/test
zsmj 2 years ago
parent
commit
1d0e5930c1
  1. 21
      src/widget/multiselect/check/multiselect.display.js

21
src/widget/multiselect/check/multiselect.display.js

@ -40,10 +40,12 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
},
items: this._createItems(opts.items),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,
layouts: [{
type: "bi.vertical",
lgap: 10
}]
layouts: [
{
type: "bi.vertical",
lgap: 10
}
]
},
itemsCreator: function (options, callback) {
if (options.times === 1) {
@ -53,10 +55,7 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
if (cacheItems.length > 0) {
var renderedItems = cacheItems.slice(0, 100);
cacheItems = cacheItems.slice(100);
self.hasNext = true;
if (cacheItems.length === 0) {
self.hasNext = false;
}
self.hasNext = cacheItems.length > 0;
callback(self._createItems(renderedItems));
return;
}
@ -65,8 +64,8 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
self.hasNext = !!ob.hasNext;
var firstItemsCount = 100 + ob.items.length % 100;
if (ob.items.length > 100) {
cacheItems = ob.items.slice(100 + ob.items.length % 100);
self.hasNext = true;
cacheItems = ob.items.slice(firstItemsCount);
self.hasNext = (firstItemsCount === ob.items.length) ? false : true;
}
callback(self._createItems(ob.items.slice(0, firstItemsCount)));
});
@ -104,4 +103,4 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
}
});
BI.shortcut("bi.display_selected_list", BI.DisplaySelectedList);
BI.shortcut("bi.display_selected_list", BI.DisplaySelectedList);

Loading…
Cancel
Save