Browse Source

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

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '5caa61da403468ffb85b91adce2a176a263409ee':
  无JIRA fix: 解决复选下拉框时序不一致问题
  无JIRA fix: 解决复选下拉框时序不一致问题
  无JIRA fix: 解决复选下拉框时序不一致问题
  无JIRA  fix: 解决复选下拉框时序不一致问题
es6
Dailer 2 years ago
parent
commit
9c49cfe613
  1. 2
      src/base/combination/searcher.js
  2. 5
      src/widget/multiselect/trigger/button.checkselected.js
  3. 8
      src/widget/multiselect/trigger/searcher.multiselect.insert.js
  4. 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);

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

8
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();
},

11
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

Loading…
Cancel
Save