1
0
Fork 0
forked from 0x2620/oxjs

add Ox.getIndex and Ox.getObject; Ox.List: use Ox.getIndex when updating item value

This commit is contained in:
rolux 2014-04-30 14:19:09 +02:00
commit 62c65026b1
2 changed files with 18 additions and 6 deletions

View file

@ -1834,7 +1834,9 @@ Ox.List = function(options, self) {
self.options.items[pos][key] = value;
} else if (self.items) {
// items array was passed to initialize the list
self.items[Ox.getIndexById(self.items, id)][key] = value;
self.items[
Ox.getIndex(self.items, self.options.unique, id)
][key] = value;
updateItems = true;
}
data[key] = value;