forked from 0x2620/oxjs
fix a bug where menus would modify item objects passed by reference
This commit is contained in:
parent
17d842c64c
commit
636f772820
3 changed files with 6 additions and 11 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
/*@
|
||||
Ox.OptionGroup <f> OptionGroup
|
||||
Helper object, used by ButtonGroup, CheckboxGroup, Select and Menu
|
||||
(items, min, max, property) -> <f> OptionGroup
|
||||
items <a> array of items
|
||||
min <n> minimum number of selected items
|
||||
|
|
@ -11,9 +12,6 @@ Ox.OptionGroup <f> OptionGroup
|
|||
|
||||
Ox.OptionGroup = function(items, min, max, property) {
|
||||
|
||||
/*
|
||||
to be used by ButtonGroup, CheckboxGroup, Select and Menu
|
||||
*/
|
||||
var length = items.length;
|
||||
property = property || 'checked';
|
||||
max = max == -1 ? length : max;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue