From 17805ff4ff5d990f3263302e704a282ee9a68435 Mon Sep 17 00:00:00 2001 From: chenzeyu Date: Mon, 22 Jul 2024 13:56:01 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"BI-148724=20fix:=20=E6=A0=91=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=9F=A5=E7=9C=8B=E5=B7=B2=E9=80=89=E9=A1=B9=E8=BF=9E?= =?UTF-8?q?=E5=8F=91=E4=B8=A4=E6=AC=A1=E8=AF=B7=E6=B1=82"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f00e4c5b6c69ae3e256cb3b378b06aac1d1b57ba. --- .../multiselect/trigger/switcher.checkselected.js | 2 -- .../src/widget/multitree/multi.tree.combo.js | 15 +++------------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js b/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js index 2c854fb31..4d5bab1da 100644 --- a/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js +++ b/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js @@ -10,7 +10,6 @@ export class MultiSelectCheckSelectedSwitcher extends Widget { static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; - static EVENT_TRIGGER_COMBO = "EVENT_TRIGGER_COMBO"; _defaultConfig() { return extend(super._defaultConfig(...arguments), { @@ -49,7 +48,6 @@ export class MultiSelectCheckSelectedSwitcher extends Widget { itemsCreator: o.itemsCreator, onClickContinueSelect() { self.switcher.hideView(); - self.fireEvent(MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_COMBO); }, ref(_ref) { self.checkPane = _ref; diff --git a/packages/fineui/src/widget/multitree/multi.tree.combo.js b/packages/fineui/src/widget/multitree/multi.tree.combo.js index 435db661e..7d61b6e9d 100644 --- a/packages/fineui/src/widget/multitree/multi.tree.combo.js +++ b/packages/fineui/src/widget/multitree/multi.tree.combo.js @@ -182,7 +182,6 @@ export class MultiTreeCombo extends Single { return self.combo.isViewVisible(); } - let shouldComboPopulate = true; this.trigger.on(MultiSelectTrigger.EVENT_FOCUS, () => { self.fireEvent(MultiTreeCombo.EVENT_FOCUS); }); @@ -260,14 +259,14 @@ export class MultiTreeCombo extends Single { } self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); - shouldComboPopulate && self.populate(); + self.populate(); self.fireEvent(MultiTreeCombo.EVENT_BEFORE_POPUPVIEW); }); this.combo.on(Combo.EVENT_BEFORE_HIDEVIEW, () => { if (isSearching()) { self._stopEditing(); self._dataChange && - self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); + self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); } else { if (isPopupView()) { self._stopEditing(); @@ -276,7 +275,7 @@ export class MultiTreeCombo extends Single { self.storeValue = { value: {} }; } self._dataChange && - self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); + self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); } } clear = false; @@ -317,18 +316,10 @@ export class MultiTreeCombo extends Single { valueFormatter: o.valueFormatter, value: { value: o.value || {} }, }); - this.numberCounter.on( - MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_COMBO, - () => { - self.populate(); - shouldComboPopulate = true; - } - ); this.numberCounter.on( MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, () => { if (!self.combo.isViewVisible()) { - shouldComboPopulate = false; self.combo.showView(); } }