Browse Source

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

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '1d0e5930c1d2e6cc0cef7fec87d632b1479f0a17':
  BI-117667 fix: 【6.0.5冒烟】数值下拉选择多个选项,查看已选点击加载更多展示重复数据
research/test
Dailer-刘荣歆 2 years ago
parent
commit
dd627cbe4a
  1. 19
      src/widget/multiselect/check/multiselect.display.js

19
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)));
});

Loading…
Cancel
Save