We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b68a38a commit 5d03ea7Copy full SHA for 5d03ea7
src/reactpy/core/events.py
@@ -3,7 +3,7 @@
3
import dis
4
import inspect
5
from collections.abc import Callable, Sequence
6
-from functools import lru_cache
+from functools import lru_cache, partial
7
from types import CodeType
8
from typing import Any, Literal, cast, overload
9
@@ -107,6 +107,9 @@ def __init__(
107
while hasattr(func_to_inspect, "__wrapped__"):
108
func_to_inspect = func_to_inspect.__wrapped__
109
110
+ if isinstance(func_to_inspect, partial):
111
+ func_to_inspect = func_to_inspect.func
112
+
113
found_prevent_default, found_stop_propagation = _inspect_event_handler_code(
114
func_to_inspect.__code__
115
)
0 commit comments