From a84bc1e04f2d544822cd110fed35ee9ab27d409e Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 16 Apr 2024 12:31:46 -0700 Subject: [PATCH] [REF-2586] Pass child event_trigger through DebounceInput (#3092) --- reflex/components/core/debounce.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reflex/components/core/debounce.py b/reflex/components/core/debounce.py index 28ba6ee3e..21c5851d8 100644 --- a/reflex/components/core/debounce.py +++ b/reflex/components/core/debounce.py @@ -79,7 +79,9 @@ class DebounceInput(Component): for p in cls.get_props() if getattr(child, p, None) is not None } - props_from_child.update(child.event_triggers) + props[EventTriggers.ON_CHANGE] = child.event_triggers.pop( + EventTriggers.ON_CHANGE + ) props = {**props_from_child, **props} # Carry all other child props directly via custom_attrs @@ -117,6 +119,7 @@ class DebounceInput(Component): component = super().create(**props) component._get_style = child._get_style + component.event_triggers.update(child.event_triggers) return component def get_event_triggers(self) -> dict[str, Any]: