Browse Source

BI-115201 fix: 【6.0.3.3】下拉树下拉后不选择任何内容,前端多发一个data请求

es6
zsmj 2 years ago
parent
commit
479c53da14
  1. 11
      src/widget/multitree/multi.tree.list.combo.js

11
src/widget/multitree/multi.tree.list.combo.js

@ -59,6 +59,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
self.combo.setValue(self.storeValue);
self.numberCounter.setValue(self.storeValue);
self._stopEditing();
self._dataChange = true;
}
}]
}
@ -116,6 +117,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
self.numberCounter.setButtonChecked(val);
self.storeValue = { value: self.combo.getValue() };
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.getValue());
self._dataChange = true;
}
}, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -126,6 +128,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,
action: function () {
clear = true;
self._dataChange = true;
self.setValue();
self._defaultState();
}
@ -209,12 +212,16 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
self.numberCounter.setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
self._dataChange = true;
});
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
if (isSearching()) {
return;
}
if (!this.isViewVisible()) {
self._dataChange = false; // 标记数据是否发生变化
}
if (change === true) {
self.storeValue = { value: self.combo.getValue() };
change = false;
@ -227,7 +234,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
if (isSearching()) {
self.trigger.stopEditing();
self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
} else {
if (isPopupView()) {
self._stopEditing();
@ -235,7 +242,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
if (clear === true) {
self.storeValue = { value: [] };
}
self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
}
}
clear = false;

Loading…
Cancel
Save