Browse Source

BI-64107 fix: assertShowValue更新value的时候也同步下assist

es6
windy 5 years ago
parent
commit
6e6b720661
  1. 12
      src/widget/multiselect/multiselect.combo.js
  2. 11
      src/widget/multiselect/multiselect.combo.nobar.js
  3. 11
      src/widget/multiselect/multiselect.insert.combo.js
  4. 11
      src/widget/multiselect/multiselect.insert.combo.nobar.js

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