Browse Source

REPORT-18332 feat: allowEdit

es6
windy 5 years ago
parent
commit
acf9d3c863
  1. 4
      src/widget/multiselect/multiselect.combo.js
  2. 4
      src/widget/singleselect/singleselect.combo.js
  3. 4
      src/widget/singleselect/singleselect.insert.combo.js
  4. 17
      src/widget/singleselect/singleselect.trigger.js

4
src/widget/multiselect/multiselect.combo.js

@ -13,7 +13,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
height: 24, height: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
} },
allowEdit: true
}); });
}, },
@ -35,6 +36,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height, height: o.height,
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,

4
src/widget/singleselect/singleselect.combo.js

@ -14,7 +14,8 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
height: 24, height: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
} },
allowEdit: true
}); });
}, },
@ -35,6 +36,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect, allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {

4
src/widget/singleselect/singleselect.insert.combo.js

@ -14,7 +14,8 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
height: 24, height: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
} },
allowEdit: true
}); });
}, },
@ -34,6 +35,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect, allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {

17
src/widget/singleselect/singleselect.trigger.js

@ -23,7 +23,8 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {}, switcher: {},
adapter: null, adapter: null,
masker: {} masker: {},
allowEdit: true
}); });
}, },
@ -75,6 +76,20 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
width: 24 width: 24
}] }]
}); });
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
}, },
getSearcher: function () { getSearcher: function () {

Loading…
Cancel
Save