From 1bdcc73d20f60538d656a5d492b2785983b99f17 Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Tue, 24 Aug 2021 20:09:35 +0800 Subject: [PATCH] =?UTF-8?q?BI-92460=20fix=EF=BC=9A=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=8F=8D=E9=80=89=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/multiselect.combo.js | 4 +++- src/widget/multiselect/multiselect.combo.nobar.js | 4 +++- src/widget/multiselect/multiselect.insert.combo.js | 4 +++- src/widget/multiselect/multiselect.insert.combo.nobar.js | 4 +++- src/widget/multiselectlist/multiselectlist.insert.js | 6 ++++-- src/widget/multiselectlist/multiselectlist.insert.nobar.js | 6 ++++-- src/widget/multiselectlist/multiselectlist.js | 4 +++- 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index a458f0c09..b2164f867 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -361,7 +361,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index fd7844f23..db7f8d042 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -387,7 +387,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 88fd16411..33bf5d9e2 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -375,7 +375,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 2552449f8..05edc2407 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -372,7 +372,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index db3edb080..2fe856a8e 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -245,7 +245,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { text: o.valueFormatter(v) || v, value: v }; - }), this.trigger.getKey()); + }), this.trigger.getKeyword()); var change = false; var map = this._makeMap(this.storeValue.value); BI.each(BI.concat(result.match, result.find), function (i, obj) { @@ -262,7 +262,9 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA, keywords: [this.trigger.getKeyword()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index 30be9c653..e4b74eff3 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -249,7 +249,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { text: o.valueFormatter(v) || v, value: v }; - }), this.trigger.getKey()); + }), this.trigger.getKeyword()); var change = false; var map = this._makeMap(this.storeValue.value); BI.each(BI.concat(result.match, result.find), function (i, obj) { @@ -266,7 +266,9 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA, keywords: [this.trigger.getKeyword()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index 50f370653..c0a3505ff 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -252,7 +252,9 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectList.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()], - selectedValues: this.storeValue.value, + selectedValues: BI.filter(this.storeValue.value, function (_i, v) { + return !BI.contains(res.value, v); + }), }, function (ob) { var items = BI.map(ob.items, "value"); var selectedMap = self._makeMap(self.storeValue.value);