fixing a bug where selects would report an incorrect value
This commit is contained in:
parent
bb9f04b7e8
commit
f71af0a205
1 changed files with 5 additions and 5 deletions
|
@ -4397,10 +4397,10 @@ requires
|
|||
};
|
||||
|
||||
that.selected = function() {
|
||||
return $.map(/*self.checked*/self.optionGroup.checked(), function(v, i) {
|
||||
return $.map(/*self.checked*/self.optionGroup.checked(), function(v) {
|
||||
return {
|
||||
id: self.options.items[i].id,
|
||||
title: self.options.items[i].title
|
||||
id: self.options.items[v].id,
|
||||
title: self.options.items[v].title
|
||||
};
|
||||
});
|
||||
};
|
||||
|
@ -4482,10 +4482,10 @@ requires
|
|||
}
|
||||
|
||||
that.value = function() {
|
||||
return $.map(self.options.elements, function(input) {
|
||||
return $.map(self.options.elements, function(element) {
|
||||
var ret = null;
|
||||
['checked', 'selected', 'value'].forEach(function(v) {
|
||||
input[v] && (ret = input[v]());
|
||||
element[v] && (ret = element[v]());
|
||||
});
|
||||
return ret;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue