Ox.api: update(items) signature is better (allows for add/remove); Ox.List: update accordingly
This commit is contained in:
parent
777fbc2a37
commit
c26a13b2f1
2 changed files with 9 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue