fix a bug in Ox.ButtonGroup
This commit is contained in:
parent
ff0b83fa89
commit
7f98cd19f2
1 changed files with 2 additions and 2 deletions
|
@ -63,12 +63,12 @@ Ox.ButtonGroup = function(options, self) {
|
||||||
function selectButton(pos) {
|
function selectButton(pos) {
|
||||||
var toggled = self.optionGroup.toggle(pos);
|
var toggled = self.optionGroup.toggle(pos);
|
||||||
if (toggled.length) {
|
if (toggled.length) {
|
||||||
toggled.forEach(function(pos, i) {
|
toggled.forEach(function(pos) {
|
||||||
self.$buttons[pos].toggleSelected();
|
self.$buttons[pos].toggleSelected();
|
||||||
});
|
});
|
||||||
that.triggerEvent('change', {
|
that.triggerEvent('change', {
|
||||||
selected: self.optionGroup.selected().map(function(i) {
|
selected: self.optionGroup.selected().map(function(i) {
|
||||||
return self.options.buttons[v].id;
|
return self.options.buttons[i].id;
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue