Browse Source

BI-66722 fix: 可新增值的单选下拉列表新增值没有发事件

master
windy 5 years ago
parent
commit
1882b1f52b
  1. 1
      changelog.md
  2. 6
      src/widget/singleselect/singleselectlist.insert.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志 # 更新日志
2.0(2020-06) 2.0(2020-06)
- 修复了单选下拉框新增值的时候没有发事件的问题
- 修复了单选标红combo类setValue为空字符串会标红的问题 - 修复了单选标红combo类setValue为空字符串会标红的问题
- BI.history提供与注册路由对应的卸载路由方法unRoute - BI.history提供与注册路由对应的卸载路由方法unRoute
- 修复了单选标红combo类setValue为空和空数组行为不一致的问题 - 修复了单选标红combo类setValue为空和空数组行为不一致的问题

6
src/widget/singleselect/singleselectlist.insert.js

@ -64,9 +64,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
self._showAdapter(); self._showAdapter();
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
self.adapter.populate(); self.adapter.populate();
if (self.storeValue.type === BI.Selection.Multi) { self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}
} }
} }
}] }]
@ -211,7 +209,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
var selectedMap = self._makeMap(items); var selectedMap = self._makeMap(items);
BI.each(keywords, function (i, val) { BI.each(keywords, function (i, val) {
if (BI.isNotNull(selectedMap[val])) { if (BI.isNotNull(selectedMap[val])) {
self.storeValue.type === BI.Selection.Single ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val); BI.pushDistinct(self.storeValue.value, val)
} }
}); });
callback(); callback();

Loading…
Cancel
Save