|
|
@ -30,7 +30,7 @@ export class MultiSelectNoBarLoader extends Widget { |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig() { |
|
|
|
_defaultConfig() { |
|
|
|
return extend(super._defaultConfig(...arguments), { |
|
|
|
return extend(super._defaultConfig(...arguments), { |
|
|
|
baseCls: "bi-multi-select-loader", |
|
|
|
baseCls: "bi-multi-select-loader-no-bar", |
|
|
|
logic: { |
|
|
|
logic: { |
|
|
|
dynamic: true, |
|
|
|
dynamic: true, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -84,12 +84,12 @@ export class MultiSelectNoBarLoader extends Widget { |
|
|
|
itemsCreator(op, callback) { |
|
|
|
itemsCreator(op, callback) { |
|
|
|
const startValue = self._startValue; |
|
|
|
const startValue = self._startValue; |
|
|
|
self.storeValue && |
|
|
|
self.storeValue && |
|
|
|
(op = extend(op || {}, { |
|
|
|
(op = extend(op || {}, { |
|
|
|
selectedValues: |
|
|
|
selectedValues: |
|
|
|
isKey(startValue) && self.storeValue.type === Selection.Multi |
|
|
|
isKey(startValue) && self.storeValue.type === Selection.Multi |
|
|
|
? self.storeValue.value.concat(startValue) |
|
|
|
? self.storeValue.value.concat(startValue) |
|
|
|
: self.storeValue.value, |
|
|
|
: self.storeValue.value, |
|
|
|
})); |
|
|
|
})); |
|
|
|
opts.itemsCreator(op, ob => { |
|
|
|
opts.itemsCreator(op, ob => { |
|
|
|
hasNext = ob.hasNext; |
|
|
|
hasNext = ob.hasNext; |
|
|
|
let firstItems = []; |
|
|
|
let firstItems = []; |
|
|
@ -118,9 +118,9 @@ export class MultiSelectNoBarLoader extends Widget { |
|
|
|
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || ""); |
|
|
|
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || ""); |
|
|
|
if (op.times === 1 && self.storeValue) { |
|
|
|
if (op.times === 1 && self.storeValue) { |
|
|
|
isKey(startValue) && |
|
|
|
isKey(startValue) && |
|
|
|
(self.storeValue.type === Selection.All |
|
|
|
(self.storeValue.type === Selection.All |
|
|
|
? remove(self.storeValue.value, startValue) |
|
|
|
? remove(self.storeValue.value, startValue) |
|
|
|
: pushDistinct(self.storeValue.value, startValue)); |
|
|
|
: pushDistinct(self.storeValue.value, startValue)); |
|
|
|
self.setValue(self.storeValue); |
|
|
|
self.setValue(self.storeValue); |
|
|
|
} |
|
|
|
} |
|
|
|
op.times === 1 && self._scrollToTop(); |
|
|
|
op.times === 1 && self._scrollToTop(); |
|
|
@ -144,10 +144,10 @@ export class MultiSelectNoBarLoader extends Widget { |
|
|
|
items: LogicFactory.createLogicItemsByDirection(Direction.Top, this.button_group), |
|
|
|
items: LogicFactory.createLogicItemsByDirection(Direction.Top, this.button_group), |
|
|
|
})))); |
|
|
|
})))); |
|
|
|
|
|
|
|
|
|
|
|
this.button_group.on(Controller.EVENT_CHANGE, function () { |
|
|
|
this.button_group.on(Controller.EVENT_CHANGE, function() { |
|
|
|
self.fireEvent(Controller.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(Controller.EVENT_CHANGE, arguments); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.button_group.on(SelectList.EVENT_CHANGE, function () { |
|
|
|
this.button_group.on(SelectList.EVENT_CHANGE, function() { |
|
|
|
self.fireEvent(MultiSelectNoBarLoader.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(MultiSelectNoBarLoader.EVENT_CHANGE, arguments); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -215,5 +215,6 @@ export class MultiSelectNoBarLoader extends Widget { |
|
|
|
this.button_group.element.css({ "max-height": toPix(h) }); |
|
|
|
this.button_group.element.css({ "max-height": toPix(h) }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resetWidth() {} |
|
|
|
resetWidth() { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|