make static list honor 'selected' options
This commit is contained in:
parent
ff1714013c
commit
2419ca3a18
1 changed files with 9 additions and 0 deletions
|
@ -110,6 +110,15 @@ Ox.List = function(options, self) {
|
|||
scrollTimeout: 0,
|
||||
selected: []
|
||||
});
|
||||
if (!self.isAsync) {
|
||||
self.selected = self.options.items.map(function(item, i) {
|
||||
return Ox.extend(item, {_index: i})
|
||||
}).filter(function(item) {
|
||||
return self.options.selected.indexOf(item[self.options.unique]) > -1;
|
||||
}).map(function(item) {
|
||||
return item['_index'];
|
||||
});
|
||||
}
|
||||
self.options.max == -1 && $.extend(self.keyboardEvents, {
|
||||
key_alt_control_a: invertSelection,
|
||||
key_control_a: selectAll
|
||||
|
|
Loading…
Reference in a new issue