Browse Source

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

es6
zsmj 2 years ago
parent
commit
a58673cc63
  1. 2
      src/base/combination/searcher.js
  2. 9
      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, keyword: keyword,
selectedValues: o.adapter && o.adapter.getValue() selectedValues: o.adapter && o.adapter.getValue()
}, function (searchResult, matchResult) { }, function (searchResult, matchResult) {
if (!self._stop) { if (!self._stop && keyword === self.editor.getValue()) {
var args = [].slice.call(arguments); var args = [].slice.call(arguments);
if (args.length > 0) { if (args.length > 0) {
args.push(keyword); args.push(keyword);

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

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

Loading…
Cancel
Save