|
@@ -34,13 +34,14 @@ class ChoiceElement(ValueElement):
|
|
|
self._update_options()
|
|
|
super().update()
|
|
|
|
|
|
- def set_options(self, options: Union[List, Dict], *, value: Any = None) -> None:
|
|
|
+ def set_options(self, options: Union[List, Dict], *, value: Any = ...) -> None:
|
|
|
"""Set the options of this choice element.
|
|
|
|
|
|
:param options: The new options.
|
|
|
:param value: The new value. If not given, the current value is kept.
|
|
|
"""
|
|
|
self.options = options
|
|
|
- if value is not None:
|
|
|
- self.value = value
|
|
|
self.update()
|
|
|
+ if value is not ...:
|
|
|
+ self.value = value
|
|
|
+ self.update()
|