diff --git a/src/base/combination/searcher.js b/src/base/combination/searcher.js index 3a8891acfb..34494ac3d2 100644 --- a/src/base/combination/searcher.js +++ b/src/base/combination/searcher.js @@ -101,18 +101,17 @@ BI.Searcher = BI.inherit(BI.Widget, { if (type === BI.Events.CLICK) { if (o.isAutoSync) { var values = o.adapter && o.adapter.getValue(); - if (!obj.isSelected()) { - o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); - } else { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - o.adapter && o.adapter.setValue([obj.getValue()]); - break; - case BI.ButtonGroup.CHOOSE_TYPE_MULTI: - values.push(obj.getValue()); - o.adapter && o.adapter.setValue(values); - break; - } + switch (o.chooseType) { + case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: + o.adapter && o.adapter.setValue([obj.getValue()]); + break; + case BI.ButtonGroup.CHOOSE_TYPE_MULTI: + if (!obj.isSelected()) { + o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); + } + values.push(obj.getValue()); + o.adapter && o.adapter.setValue(values); + break; } } self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); diff --git a/src/case/tree/treeexpander/tree.expander.js b/src/case/tree/treeexpander/tree.expander.js index dd151b2dc8..50d2bef61d 100644 --- a/src/case/tree/treeexpander/tree.expander.js +++ b/src/case/tree/treeexpander/tree.expander.js @@ -35,6 +35,7 @@ isFirstNode: o.isFirstNode || o.el.isFirstNode, el: o.popup, }, + value: o.value, listeners: [ { eventName: BI.Controller.EVENT_CHANGE, diff --git a/src/case/tree/treeexpander/tree.expander.popup.js b/src/case/tree/treeexpander/tree.expander.popup.js index a51d6711fe..a101b728c2 100644 --- a/src/case/tree/treeexpander/tree.expander.popup.js +++ b/src/case/tree/treeexpander/tree.expander.popup.js @@ -12,7 +12,9 @@ var self = this; var o = this.options; - this.popupView = BI.createWidget(o.el, this); + this.popupView = BI.createWidget(BI.extend(o.el, { + value: o.value + }), this); this.popupView.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);