|
|
|
@ -72,6 +72,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
let changeTag = false; |
|
|
|
|
const popup = { |
|
|
|
|
type: "bi.text_value_combo_popup", |
|
|
|
|
ref: ref => this.popup = ref, |
|
|
|
@ -81,9 +82,12 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
{ |
|
|
|
|
eventName: BI.TextValueComboPopup.EVENT_CHANGE, |
|
|
|
|
action: (...args) => { |
|
|
|
|
changeTag = true; |
|
|
|
|
this.setValue(this.popup.getValue()); |
|
|
|
|
this.combo.hideView(); |
|
|
|
|
this.fireEvent(BI.TextValueCombo.EVENT_CHANGE, ...args); |
|
|
|
|
if (o.chooseType === BI.ButtonGroup.CHOOSE_TYPE_SINGLE) { |
|
|
|
|
this.combo.hideView(); |
|
|
|
|
this.fireEvent(BI.TextValueCombo.EVENT_CHANGE, ...args); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.Controller.EVENT_CHANGE, |
|
|
|
@ -101,6 +105,21 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
direction: o.direction, |
|
|
|
|
adjustLength: 2, |
|
|
|
|
el: trigger, |
|
|
|
|
listeners: [ |
|
|
|
|
{ |
|
|
|
|
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, |
|
|
|
|
action: (...args) => { |
|
|
|
|
changeTag = false; |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, |
|
|
|
|
action: (...args) => { |
|
|
|
|
if (changeTag) { |
|
|
|
|
this.fireEvent(BI.TextValueCombo.EVENT_CHANGE, ...args); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
popup: { |
|
|
|
|
el: popup, |
|
|
|
|
value: o.value, |
|
|
|
|