1
0
Fork 0
forked from 0x2620/oxjs

Ox.api: update(items) signature is better (allows for add/remove); Ox.List: update accordingly

This commit is contained in:
rolux 2014-04-30 13:39:14 +02:00
commit c26a13b2f1
2 changed files with 9 additions and 8 deletions

View file

@ -306,11 +306,10 @@ Ox.api = function(items, options) {
ret = Ox.extend(
api.cache ? Ox.cache(fn, {async: true}) : fn,
{
update: function(index, item) {
items[index] = item;
update: function(updatedItems) {
items = updatedItems;
api.cache && ret.clear();
sortBy.clear();
return items;
}
}
),