Browse Source

BI-93998 fix:文本下拉和文本列表绑定字段值有空时,单选模式下,不能选中空值

es6
Tangjinxia 3 years ago
parent
commit
5421a8bc74
  1. 2
      src/widget/singleselect/search/singleselect.search.loader.js
  2. 4
      src/widget/singleselect/singleselect.loader.js

2
src/widget/singleselect/search/singleselect.search.loader.js

@ -60,7 +60,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var keyword = ob.keyword = opts.keywordGetter();
hasNext = ob.hasNext;
var firstItems = [];
if (op.times === 1 && BI.isNotNull(self.storeValue)) {
if (op.times === 1 && !BI.isUndefined(self.storeValue)) {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}

4
src/widget/singleselect/singleselect.loader.js

@ -60,13 +60,13 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
}, opts.el),
itemsCreator: function (op, callback) {
var startValue = self._startValue;
BI.isNotNull(self.storeValue) && (op = BI.extend(op || {}, {
!BI.isUndefined(self.storeValue) && (op = BI.extend(op || {}, {
selectedValues: [self.storeValue]
}));
opts.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
var firstItems = [];
if (op.times === 1 && BI.isNotNull(self.storeValue)) {
if (op.times === 1 && !BI.isUndefined(self.storeValue)) {
var json = BI.map([self.storeValue], function (i, v) {
var txt = opts.valueFormatter(v) || v;
return {

Loading…
Cancel
Save