From 007b00c2c6d0b0afefd1a436b8858bc800e47b70 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 13 Apr 2020 15:55:03 +0800 Subject: [PATCH] =?UTF-8?q?BI-63192=20fix:=20=E4=BF=AE=E5=A4=8Dmulti=5Fsel?= =?UTF-8?q?ect=5Flist=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=A4=E6=AC=A1itemsCre?= =?UTF-8?q?ator=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselectlist/multiselectlist.insert.js | 9 ++++++--- .../multiselectlist/multiselectlist.insert.nobar.js | 9 ++++++--- src/widget/multiselectlist/multiselectlist.js | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index ea51fbf92..2c56a3ac2 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -46,9 +46,12 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { return self.trigger.getKeyword(); }, itemsCreator: function (op, callback) { - op.keywords = [self.trigger.getKeyword()]; - this.setKeyword(op.keywords[0]); - o.itemsCreator(op, callback); + var keyword = self.trigger.getKeyword(); + if (BI.isNotEmptyString(keyword)) { + op.keywords = [keyword]; + this.setKeyword(op.keywords[0]); + o.itemsCreator(op, callback); + } }, listeners: [{ eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index 136aa51c5..04b29e09b 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -52,9 +52,12 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { return self.trigger.getKeyword(); }, itemsCreator: function (op, callback) { - op.keywords = [self.trigger.getKeyword()]; - this.setKeyword(op.keywords[0]); - o.itemsCreator(op, callback); + var keyword = self.trigger.getKeyword(); + if (BI.isNotEmptyString(keyword)) { + op.keywords = [keyword]; + this.setKeyword(op.keywords[0]); + o.itemsCreator(op, callback); + } }, listeners: [{ eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index d364b6336..b0085f5d6 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -50,9 +50,12 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { return self.trigger.getKeyword(); }, itemsCreator: function (op, callback) { - op.keywords = [self.trigger.getKeyword()]; - this.setKeyword(op.keywords[0]); - o.itemsCreator(op, callback); + var keyword = self.trigger.getKeyword(); + if (BI.isNotEmptyString(keyword)) { + op.keywords = [keyword]; + this.setKeyword(op.keywords[0]); + o.itemsCreator(op, callback); + } } }); this.searcherPane.setVisible(false);