From defce07c3009786e917b793daa4116cdf5e8dda4 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 12 Aug 2020 14:25:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-37258=20fix:=20=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=B0=83=E7=94=A8populate=20=E6=B8=85=E7=A9=BA=E4=BA=86?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/treevaluechooser/combo.listtreevaluechooser.js | 4 +++- .../treevaluechooser/combo.treevaluechooser.insert.js | 4 +++- src/component/treevaluechooser/combo.treevaluechooser.js | 4 +++- src/component/treevaluechooser/pane.treevaluechooser.js | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index b6ceac7192..51e9cd0475 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -93,7 +93,9 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, }, populate: function (items) { - this._initData(items); + if (BI.isNotNull(items)) { + this._initData(items); + } this.combo.populate(); } }); diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index a99d24cc3a..15ebd6ea0b 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -92,7 +92,9 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { }, populate: function (items) { - this._initData(items); + if (BI.isNotNull(items)) { + this._initData(items); + } this.combo.populate(); } }); diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index b1a11cb5d2..2b567b0876 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -96,7 +96,9 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { }, populate: function (items) { - this._initData(items); + if (BI.isNotNull(items)) { + this._initData(items); + } this.combo.populate(); } }); diff --git a/src/component/treevaluechooser/pane.treevaluechooser.js b/src/component/treevaluechooser/pane.treevaluechooser.js index a8b4443908..39a81d0c4f 100644 --- a/src/component/treevaluechooser/pane.treevaluechooser.js +++ b/src/component/treevaluechooser/pane.treevaluechooser.js @@ -50,7 +50,9 @@ BI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, { }, populate: function (items) { - this._initData(items); + if (BI.isNotNull(items)) { + this._initData(items); + } this.pane.populate(); } }); From ab999a7ec589edeccc09a225a4debae2939fd6fa Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 12 Aug 2020 14:56:23 +0800 Subject: [PATCH 2/2] update --- src/component/allvaluechooser/combo.allvaluechooser.js | 4 +++- src/component/allvaluechooser/pane.allvaluechooser.js | 4 +++- src/component/valuechooser/combo.valuechooser.insert.js | 4 +++- src/component/valuechooser/combo.valuechooser.js | 4 +++- src/component/valuechooser/pane.valuechooser.js | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/component/allvaluechooser/combo.allvaluechooser.js b/src/component/allvaluechooser/combo.allvaluechooser.js index db8bb17321..3b7306a6ad 100644 --- a/src/component/allvaluechooser/combo.allvaluechooser.js +++ b/src/component/allvaluechooser/combo.allvaluechooser.js @@ -61,7 +61,9 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, { populate: function (items) { // 直接用combo的populate不会作用到AbstractValueChooser上 - this.items = items; + if (BI.isNotNull(items)) { + this.items = items; + } this.combo.populate(); } }); diff --git a/src/component/allvaluechooser/pane.allvaluechooser.js b/src/component/allvaluechooser/pane.allvaluechooser.js index 9983bb42a8..93ad36cba1 100644 --- a/src/component/allvaluechooser/pane.allvaluechooser.js +++ b/src/component/allvaluechooser/pane.allvaluechooser.js @@ -58,7 +58,9 @@ BI.AllValueChooserPane = BI.inherit(BI.AbstractAllValueChooser, { populate: function (items) { // 直接用combo的populate不会作用到AbstractValueChooser上 - this.items = items; + if (BI.isNotNull(items)) { + this.items = items; + } this.list.populate(); } }); diff --git a/src/component/valuechooser/combo.valuechooser.insert.js b/src/component/valuechooser/combo.valuechooser.insert.js index 8404575648..b86963806f 100644 --- a/src/component/valuechooser/combo.valuechooser.insert.js +++ b/src/component/valuechooser/combo.valuechooser.insert.js @@ -88,7 +88,9 @@ BI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, { populate: function (items) { // 直接用combo的populate不会作用到AbstractValueChooser上 - this.items = items; + if (BI.isNotNull(items)) { + this.items = items; + } this.combo.populate(); } }); diff --git a/src/component/valuechooser/combo.valuechooser.js b/src/component/valuechooser/combo.valuechooser.js index 1dc34d4d49..f7a1c6a351 100644 --- a/src/component/valuechooser/combo.valuechooser.js +++ b/src/component/valuechooser/combo.valuechooser.js @@ -92,7 +92,9 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, { populate: function (items) { // 直接用combo的populate不会作用到AbstractValueChooser上 - this.items = items; + if (BI.isNotNull(items)) { + this.items = items; + } this.combo.populate(); } }); diff --git a/src/component/valuechooser/pane.valuechooser.js b/src/component/valuechooser/pane.valuechooser.js index 6d464e3378..d483f26fbc 100644 --- a/src/component/valuechooser/pane.valuechooser.js +++ b/src/component/valuechooser/pane.valuechooser.js @@ -60,7 +60,9 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, { populate: function (items) { // 直接用combo的populate不会作用到AbstractValueChooser上 - items && (this.items = items); + if (BI.isNotNull(items)) { + this.items = items; + } this.list.populate(); } });