Allow setting multiple values for ButtonGroup #360
No reviewers
Labels
No labels
0.1
0.2
0.3
1.0
Ox
Ox.Geo
Ox.Image
Ox.UI
Ox.Unicode
critical
defect
deleteme
duplicate
enhancement
fixed
major
minor
normal
severity: major
severity: minor
severity: normal
task
trivial
wontfix
worksforme
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: 0x2620/oxjs#360
Loading…
Reference in a new issue
No description provided.
Delete branch "qsniyg/oxjs:buttongroup-values"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Previously calling
ButtonGroup::options('value', /*...*/)
would toggle the value. With this new code it simply sets value.For example, say you have a ButtonGroup
bg
with the valuesa, B, c
, where a capital denotes the button currently selected. Here is how the function would alter its value:bg.options('value', 'b')
->a, B, c
bg.options('value', 'z')
->a, b, c
(a, B, c
ifmin
== 0, i.e. it doesn't alter the value)bg.options('value', ['a', 'b'])
->A, B, c
While this changes the behavior, it's consistent with the way
value
is set by the widget (throughself.options.value = self.optionGroup.value();
intoggleButton
).