|
@@ -8,6 +8,9 @@ class Toggle(ChoiceElement):
|
|
|
def __init__(self, options: Union[List, Dict], *, value: Any = None, on_change: Optional[Callable] = None) -> None:
|
|
|
"""Toggle
|
|
|
|
|
|
+ The options can be specified as a list of values, or as a dictionary mapping values to labels.
|
|
|
+ After manipulating the options, call `update()` to update the options in the UI.
|
|
|
+
|
|
|
:param options: a list ['value1', ...] or dictionary `{'value1':'label1', ...}` specifying the options
|
|
|
:param value: the initial value
|
|
|
:param on_change: callback to execute when selection changes
|