Browse Source

无JIRA fix: 解决复选下拉框时序不一致问题

es6
zsmj 2 years ago
parent
commit
c2c7c06083
  1. 4
      src/widget/multiselect/multiselect.combo.js
  2. 4
      src/widget/multiselect/multiselect.insert.combo.js
  3. 6
      src/widget/multiselect/trigger/searcher.multiselect.insert.js

4
src/widget/multiselect/multiselect.combo.js

@ -284,13 +284,11 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this;
var o = this.options;
o.itemsCreator(op, function (res) {
var args = Array.prototype.slice.call(arguments);
if (op.times === 1 && BI.isNotNull(op.keywords)) {
// 预防trigger内部把当前的storeValue改掉
self.trigger.setValue(BI.deepClone(self.getValue()));
}
args.push(op);
callback.apply(self, args);
callback.apply(self, arguments);
});
},

4
src/widget/multiselect/multiselect.insert.combo.js

@ -285,13 +285,11 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
_itemsCreator4Trigger: function (op, callback) {
var self = this, o = this.options;
o.itemsCreator(op, function (res) {
var args = Array.prototype.slice.call(arguments);
if (op.times === 1 && BI.isNotNull(op.keywords)) {
// 预防trigger内部把当前的storeValue改掉
self.trigger.setValue(BI.deepClone(self.getValue()));
}
args.push(op);
callback.apply(self, args);
callback.apply(self, arguments);
});
},

6
src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -62,12 +62,10 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
itemsCreator: function (op, callback) {
var keyword = self.editor.getKeyword();
op.keywords = [keyword];
self.op = op;
this.setKeyword(keyword);
o.itemsCreator(op, function () {
var args = Array.prototype.slice.call(arguments);
if (BI.last(args) === self.op) {
callback.apply(null, args);
if (keyword === self.editor.getValue()) {
callback.apply(null, arguments);
}
});
},

Loading…
Cancel
Save