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,
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);

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

@ -62,11 +62,14 @@ 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,
value: o.value

Loading…
Cancel
Save