diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index 200a0ce1..046df559 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -95,15 +95,9 @@ Ox.List = function(options, self) { updateItems(); } else { if (Ox.isArray(self.options.items)) { - // FIXME: duplicated + // FIXME: retarded workaround self.items = self.options.items; - self.options.items = Ox.api(self.items, { - cache: true, - map: self.options.map, - sort: self.options.sort, - sums: self.options.sums, - unique: self.options.unique - }); + self.options.items = self.itemsAPI.update(self.items); /* self.listLength = self.options.items.length; updateSelected(); @@ -140,6 +134,9 @@ Ox.List = function(options, self) { sums: self.options.sums, unique: self.options.unique }); + // FIXME: this is retarded, only needed because setting items later will + // overwrite the items API. + self.itemsAPI = self.options.items; } that.$content.bindEvent({ diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index d627978c..693a3f45 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -310,6 +310,7 @@ Ox.api = function(items, options) { items = updatedItems; api.cache && ret.clear(); sortBy.clear(); + return ret; } } ),