diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 9542637d..0e1f6112 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -7656,7 +7656,8 @@ requires that.addItems = function(pos, items) { var $items = [], - length = items.length; + length = items.length + first = self.$items.length == 0; self.selected.forEach(function(v, i) { if (v >= pos) { self.selected[i] += length; @@ -7681,8 +7682,11 @@ requires $item.insertAfter($items[i - 1]); } }); + self.options.items.splice.apply(self.options.items, $.merge([pos, 0], items)); self.$items.splice.apply(self.$items, $.merge([pos, 0], $items)); + if(first) + loadItems(); updatePositions(); }