forked from 0x2620/oxjs
fix optionsGroupOffset for multiple groups and seperators
This commit is contained in:
parent
f8895e259c
commit
a7b14f9e0a
2 changed files with 9 additions and 3 deletions
|
|
@ -287,8 +287,10 @@ Ox.Menu = function(options, self) {
|
|||
'min' in item ? item.min : 1,
|
||||
'max' in item ? item.max : 1
|
||||
);
|
||||
self.optionGroupOffset[item.group] = i + offset;
|
||||
offset += items[i].length - 1;
|
||||
self.optionGroupOffset[item.group] = offset;
|
||||
offset += items[i].length;
|
||||
} else if ('id' in item) {
|
||||
offset += 1;
|
||||
}
|
||||
});
|
||||
items = Ox.flatten(items);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue