Browse Source

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

es6
zsmj 2 years ago
parent
commit
a58673cc63
  1. 2
      src/base/combination/searcher.js
  2. 11
      src/widget/multiselect/trigger/searcher.multiselect.js

2
src/base/combination/searcher.js

@ -183,7 +183,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
keyword: keyword,
selectedValues: o.adapter && o.adapter.getValue()
}, function (searchResult, matchResult) {
if (!self._stop) {
if (!self._stop && keyword === self.editor.getValue()) {
var args = [].slice.call(arguments);
if (args.length > 0) {
args.push(keyword);

11
src/widget/multiselect/trigger/searcher.multiselect.js

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

Loading…
Cancel
Save