diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index e3fd089e46..ce3e60fe39 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -195,7 +195,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self._dataChange = false;// 标记数据是否发生变化 + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); @@ -290,12 +292,12 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, right: o.height, top: 0, - height: o.height, + height: o.height }] }); }, - _itemsCreator4Trigger: function(op, callback) { + _itemsCreator4Trigger: function (op, callback) { var self = this, o = this.options; o.itemsCreator(op, function (res) { if (op.times === 1 && BI.isNotNull(op.keywords)) { @@ -306,7 +308,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }); }, - _stopEditing: function() { + _stopEditing: function () { this.trigger.stopEditing(); this.numberCounter.hideView(); }, @@ -394,6 +396,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { var self = this, o = this.options; adjust(); callback(); + function adjust () { if (self.wants2Quit === true) { self._dataChange && self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); @@ -440,11 +443,11 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, - showView:function (){ + showView: function () { this.combo.showView(); }, - hideView:function (){ + hideView: function () { this.combo.hideView(); }, diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 9d80ae824a..e49b9dc476 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -188,7 +188,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self._dataChange = false;// 标记数据是否发生变化 + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 91c07174dc..a28858b872 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -190,7 +190,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self._dataChange = false;// 标记数据是否发生变化 + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index a2120469ce..845ae893c9 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -185,7 +185,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self._dataChange = false;// 标记数据是否发生变化 + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js index caa6abac61..258f9a612a 100644 --- a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js +++ b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js @@ -177,7 +177,9 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self._dataChange = false;// 标记数据是否发生变化 + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate();