forked from 0x2620/oxjs
add Ox.getIndex and Ox.getObject; Ox.List: use Ox.getIndex when updating item value
This commit is contained in:
parent
38b7072822
commit
62c65026b1
2 changed files with 18 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue