Browse Source

JSY-26289 fix: 修复无全选按钮时搜索面板勾选不生效

research/test
Renzo 2 years ago
parent
commit
5125e3211a
  1. 19
      src/widget/multiselect/search/multiselect.search.loader.js

19
src/widget/multiselect/search/multiselect.search.loader.js

@ -123,7 +123,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
self.setValue(self.storeValue.value);
}
});
},
@ -134,15 +134,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
if (opts.allowSelectAll) {
this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {
var searchLoaderEventChangeName = opts.allowSelectAll ? BI.SelectList.EVENT_CHANGE : BI.ListPane.EVENT_CHANGE
this.button_group.on(searchLoaderEventChangeName, function () {
self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments);
});
} else {
this.button_group.on(BI.ListPane.EVENT_CHANGE, function (val) {
self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, val);
});
}
},
_createItems: function (items) {
@ -202,7 +197,15 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
},
getValue: function () {
var o = this.options;
if (o.allowSelectAll) {
return this.button_group.getValue();
}
return {
type: BI.ButtonGroup.CHOOSE_TYPE_MULTI,
value: this.button_group.getValue(),
assist: this.button_group.getNotSelectedValue()
};
},
getAllButtons: function () {

Loading…
Cancel
Save