From 98b81c0b863d5ad87640bca880b469fb9880b36e Mon Sep 17 00:00:00 2001 From: dailer Date: Tue, 9 Apr 2019 15:45:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20fix:=20multi?= =?UTF-8?q?=5Fselect=5Fcombo=20=E5=92=8C=20multi=5Fselect=5Finsert=5Fcombo?= =?UTF-8?q?=20=E7=BB=9F=E4=B8=80=E9=80=BB=E8=BE=91,=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E5=8B=BE=E9=80=89=E4=BA=86=E5=85=A8=E9=80=89=E6=89=8D=E8=AE=A4?= =?UTF-8?q?=E4=B8=BA=E6=98=AF=E5=85=A8=E9=80=89.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/multiselect.combo.js | 28 ++------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index d4c7b8223..de914f337 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -299,32 +299,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { _adjust: function (callback) { var self = this, o = this.options; - if (!this._count) { - o.itemsCreator({ - type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH - }, function (res) { - self._count = res.count; - adjust(); - callback(); - }); - } else { - adjust(); - callback(); - - } - + adjust(); + callback(); function adjust () { - if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { - self.storeValue = { - type: BI.Selection.Multi, - value: [] - }; - } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { - self.storeValue = { - type: BI.Selection.All, - value: [] - }; - } if (self.wants2Quit === true) { self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); self.wants2Quit = false; @@ -377,7 +354,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, populate: function () { - this._count = null; this.combo.populate.apply(this.combo, arguments); } });