fix for event handlers in py3.9 (#4416)
This commit is contained in:
parent
e0984aa834
commit
d4b197b517
@ -12,7 +12,9 @@ from reflex.vars.base import Var
|
||||
from ..base import LiteralAccentColor, RadixThemesComponent
|
||||
|
||||
|
||||
def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]:
|
||||
def on_value_change(
|
||||
value: Var[Union[str, List[str]]],
|
||||
) -> Tuple[Var[Union[str, List[str]]]]:
|
||||
"""Handle the on_value_change event.
|
||||
|
||||
Args:
|
||||
|
@ -13,7 +13,9 @@ from reflex.vars.base import Var
|
||||
|
||||
from ..base import RadixThemesComponent
|
||||
|
||||
def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]: ...
|
||||
def on_value_change(
|
||||
value: Var[Union[str, List[str]]],
|
||||
) -> Tuple[Var[Union[str, List[str]]]]: ...
|
||||
|
||||
class SegmentedControlRoot(RadixThemesComponent):
|
||||
@overload
|
||||
@ -118,7 +120,10 @@ class SegmentedControlRoot(RadixThemesComponent):
|
||||
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
||||
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
||||
on_change: Optional[
|
||||
Union[EventType[[], BASE_STATE], EventType[[str | List[str]], BASE_STATE]]
|
||||
Union[
|
||||
EventType[[], BASE_STATE],
|
||||
EventType[[Union[str, List[str]]], BASE_STATE],
|
||||
]
|
||||
] = None,
|
||||
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
||||
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
||||
|
Loading…
Reference in New Issue
Block a user