fix map() in OptionGroup
This commit is contained in:
parent
a8c5dd4d35
commit
16ab404619
1 changed files with 4 additions and 2 deletions
|
@ -109,8 +109,10 @@ Ox.OptionGroup = function(items, min, max, property) {
|
||||||
value <f> get value
|
value <f> get value
|
||||||
@*/
|
@*/
|
||||||
this.value = function() {
|
this.value = function() {
|
||||||
var value = Ox.map(items, function(item) {
|
var value = items.filter(function(item) {
|
||||||
return item[property] ? item.id : null;
|
return item[property];
|
||||||
|
}).function(item) {
|
||||||
|
return item.id;
|
||||||
});
|
});
|
||||||
return max == 1 ? (value.length ? value[0] : '') : value;
|
return max == 1 ? (value.length ? value[0] : '') : value;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue