Browse Source

无JIRA fix: bi.text_value_down_list_combo修复

es6
zsmj 2 years ago
parent
commit
8c3b50b19e
  1. 24
      src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

24
src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -19,14 +19,6 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
if(BI.isNotNull(o.value)) {
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
cls: "text-value-down-list-trigger",
height: BI.toPix(o.height, 2),
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({
type: "bi.down_list_combo",
@ -35,7 +27,17 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
adjustLength: 2,
width: BI.toPix(o.width, 2),
height: BI.toPix(o.height, 2),
el: this.trigger,
el: {
type: "bi.down_list_select_text_trigger",
ref: function (_ref) {
self.trigger = _ref;
},
cls: "text-value-down-list-trigger",
height: BI.toPix(o.height, 2),
items: o.items,
text: o.text,
value: value
},
value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items)
});
@ -79,7 +81,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
setValue: function (v) {
v = this._digest(v);
this.combo.setValue([v]);
this.trigger.setValue(v);
this.trigger?.setValue(v);
},
getValue: function () {
@ -94,4 +96,4 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
}
});
BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);
BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo);

Loading…
Cancel
Save