Browse Source

Merge pull request #1305 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '07f1022c9bb850ad278051d6351136bcc9d0dbf6':
  update
  BI-64107 fix: assertShowValue更新value的时候也同步下assist
es6
windy 5 years ago
parent
commit
4fed6ce27a
  1. 1
      changelog.md
  2. 12
      src/widget/multiselect/multiselect.combo.js
  3. 11
      src/widget/multiselect/multiselect.combo.nobar.js
  4. 11
      src/widget/multiselect/multiselect.insert.combo.js
  5. 11
      src/widget/multiselect/multiselect.insert.combo.nobar.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志
2.0(2020-04)
- 修复了复选下拉全选状态下使用空格添加值trigger显示更新不对的问题
- 复选下拉树展开节点提供分页加载和滚动加载两种方式
- 修复了复选下拉列表初始化的时候发送执行两次itemsCreator的问题
- 修复了virtual_list重新populate无效的问题

12
src/widget/multiselect/multiselect.combo.js

@ -23,7 +23,17 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
var assertShowValue = function () {
BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));
if (BI.isKey(self._startValue)) {
if (self.storeValue.type === BI.Selection.All) {
BI.remove(self.storeValue.value, self._startValue);
self.storeValue.assist = self.storeValue.assist || [];
self.storeValue.assist.pushDistinct(self._startValue);
} else {
BI.pushDistinct(self.storeValue.value, self._startValue);
BI.remove(self.storeValue.assist, self._startValue);
}
}
self.trigger.getSearcher().setState(self.storeValue);
self.numberCounter.setButtonChecked(self.storeValue);
};

11
src/widget/multiselect/multiselect.combo.nobar.js

@ -22,7 +22,16 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
var assertShowValue = function () {
BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));
if (BI.isKey(self._startValue)) {
if (self.storeValue.type === BI.Selection.All) {
BI.remove(self.storeValue.value, self._startValue);
self.storeValue.assist = self.storeValue.assist || [];
self.storeValue.assist.pushDistinct(self._startValue);
} else {
BI.pushDistinct(self.storeValue.value, self._startValue);
BI.remove(self.storeValue.assist, self._startValue);
}
}
self.trigger.getSearcher().setState(self.storeValue);
self.numberCounter.setButtonChecked(self.storeValue);
};

11
src/widget/multiselect/multiselect.insert.combo.js

@ -23,7 +23,16 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
var assertShowValue = function () {
BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));
if (BI.isKey(self._startValue)) {
if(self.storeValue.type === BI.Selection.All) {
BI.remove(self.storeValue.value, self._startValue);
self.storeValue.assist = self.storeValue.assist || [];
self.storeValue.assist.pushDistinct(self._startValue);
} else {
BI.pushDistinct(self.storeValue.value, self._startValue);
BI.remove(self.storeValue.assist, self._startValue);
}
}
self.trigger.getSearcher().setState(self.storeValue);
self.numberCounter.setButtonChecked(self.storeValue);
};

11
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -22,7 +22,16 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
var assertShowValue = function () {
BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));
if (BI.isKey(self._startValue)) {
if (self.storeValue.type === BI.Selection.All) {
BI.remove(self.storeValue.value, self._startValue);
self.storeValue.assist = self.storeValue.assist || [];
self.storeValue.assist.pushDistinct(self._startValue);
} else {
BI.pushDistinct(self.storeValue.value, self._startValue);
BI.remove(self.storeValue.assist, self._startValue);
}
}
self.trigger.getSearcher().setState(self.storeValue);
self.numberCounter.setButtonChecked(self.storeValue);
};

Loading…
Cancel
Save