|
|
|
@ -64,7 +64,6 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
|
|
|
|
|
value: v, |
|
|
|
|
title: txt, |
|
|
|
|
selected: self.storeValue.type === BI.Selection.Multi, |
|
|
|
|
...opts.itemFormatter(v), |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) { |
|
|
|
@ -74,7 +73,6 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
|
|
|
|
|
value: startValue, |
|
|
|
|
title: txt, |
|
|
|
|
selected: true, |
|
|
|
|
...opts.itemFormatter(startValue), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
firstItems = self._createItems(json); |
|
|
|
@ -111,13 +109,18 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
_createItems: function (items) { |
|
|
|
|
var allSelected = this.isAllSelected(); |
|
|
|
|
return BI.createItems(items, { |
|
|
|
|
type: "bi.multi_select_item", |
|
|
|
|
logic: this.options.logic, |
|
|
|
|
cls: "bi-list-item-active", |
|
|
|
|
height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, |
|
|
|
|
selected: allSelected, |
|
|
|
|
iconWrapperWidth: 36 |
|
|
|
|
var itemFormatter = this.options.itemFormatter; |
|
|
|
|
return BI.map(items, (i, item) => { |
|
|
|
|
return { |
|
|
|
|
type: "bi.multi_select_item", |
|
|
|
|
logic: this.options.logic, |
|
|
|
|
cls: "bi-list-item-active", |
|
|
|
|
height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, |
|
|
|
|
selected: allSelected, |
|
|
|
|
iconWrapperWidth: 36, |
|
|
|
|
...item, |
|
|
|
|
...itemFormatter(item), |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|