diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index d3d3507e..5f359bcc 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -1819,7 +1819,8 @@ Ox.List = function(options, self) { id = args.shift(), pos = Ox.isNumber(id) ? id : getPositionById(id), $item = self.$items[pos], - data = $item ? $item.options('data') : {}; + data = $item ? $item.options('data') : {}, + updateItems = false; if (arguments.length == 1) { return data; } else if (arguments.length == 2 && Ox.isString(arguments[1])) { @@ -1834,10 +1835,22 @@ Ox.List = function(options, self) { } if (!self.isAsync) { self.options.items[pos][key] = value; + } else if(self.items) { + self.items[Ox.getIndexById(self.items, id)][key] = value; + updateItems = true; } data[key] = value; }); $item.options({data: data}); + if (updateItems) { + 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 + }); + } return that; } };