diff --git a/src/base/combination/searcher.js b/src/base/combination/searcher.js index c4fd29025..0989b4c8a 100644 --- a/src/base/combination/searcher.js +++ b/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); diff --git a/src/widget/multiselect/trigger/button.checkselected.js b/src/widget/multiselect/trigger/button.checkselected.js index 47a5ca995..17468061f 100644 --- a/src/widget/multiselect/trigger/button.checkselected.js +++ b/src/widget/multiselect/trigger/button.checkselected.js @@ -40,7 +40,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { self.numberCounter.setText(self.numberCounter.getTag()); }); this.setVisible(false); - if(BI.isNotNull(o.value)){ + if (BI.isNotNull(o.value)) { this.setValue(o.value); } }, @@ -51,6 +51,9 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH }, function (res) { + if (self.options.value.type !== BI.Selection.All) { + return; + } if (BI.isNotEmptyString(res.count)) { BI.nextTick(function () { self.numberCounter.setText(res.count); diff --git a/src/widget/multiselect/trigger/searcher.multiselect.insert.js b/src/widget/multiselect/trigger/searcher.multiselect.insert.js index 404a0e4e8..36b3a115f 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.insert.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.insert.js @@ -63,7 +63,11 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { var keyword = self.editor.getKeyword(); op.keywords = [keyword]; this.setKeyword(keyword); - o.itemsCreator(op, callback); + o.itemsCreator(op, function () { + if (keyword === self.editor.getValue()) { + callback.apply(null, arguments); + } + }); }, itemHeight: o.itemHeight, value: o.value, @@ -174,7 +178,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { } }, - getState: function() { + getState: function () { return this.editor.getState(); }, diff --git a/src/widget/multiselect/trigger/searcher.multiselect.js b/src/widget/multiselect/trigger/searcher.multiselect.js index ab2688eb4..4dbfbead7 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.js @@ -51,7 +51,6 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { callback(); }, el: this.editor, - popup: BI.extend({ type: "bi.multi_select_search_pane", valueFormatter: o.valueFormatter, @@ -61,7 +60,15 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { itemsCreator: function (op, callback) { var keyword = self.editor.getValue(); op.keywords = [keyword]; - o.itemsCreator(op, callback); + o.itemsCreator(op, function () { + 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