load items for empty lists
This commit is contained in:
parent
ff4798b421
commit
80649e4533
1 changed files with 5 additions and 1 deletions
|
@ -7656,7 +7656,8 @@ requires
|
||||||
|
|
||||||
that.addItems = function(pos, items) {
|
that.addItems = function(pos, items) {
|
||||||
var $items = [],
|
var $items = [],
|
||||||
length = items.length;
|
length = items.length
|
||||||
|
first = self.$items.length == 0;
|
||||||
self.selected.forEach(function(v, i) {
|
self.selected.forEach(function(v, i) {
|
||||||
if (v >= pos) {
|
if (v >= pos) {
|
||||||
self.selected[i] += length;
|
self.selected[i] += length;
|
||||||
|
@ -7681,8 +7682,11 @@ requires
|
||||||
$item.insertAfter($items[i - 1]);
|
$item.insertAfter($items[i - 1]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.options.items.splice.apply(self.options.items, $.merge([pos, 0], items));
|
self.options.items.splice.apply(self.options.items, $.merge([pos, 0], items));
|
||||||
self.$items.splice.apply(self.$items, $.merge([pos, 0], $items));
|
self.$items.splice.apply(self.$items, $.merge([pos, 0], $items));
|
||||||
|
if(first)
|
||||||
|
loadItems();
|
||||||
updatePositions();
|
updatePositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue