debounce: handle custom code from child component

Include _get_all_hooks when rendering the child element, instead of just
internal hooks.
This commit is contained in:
Masen Furer 2024-10-09 13:18:52 -07:00
parent f3b8b2e336
commit 5ff2f817be
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95

View File

@ -118,7 +118,7 @@ class DebounceInput(Component):
_var_type=Type[Component],
_var_data=VarData(
imports=child._get_imports(),
hooks=child._get_hooks_internal(),
hooks=child._get_all_hooks(),
),
),
)
@ -128,6 +128,10 @@ class DebounceInput(Component):
component.event_triggers.update(child.event_triggers)
component.children = child.children
component._rename_props = child._rename_props
outer_get_all_custom_code = component._get_all_custom_code
component._get_all_custom_code = lambda: outer_get_all_custom_code().union(
child._get_all_custom_code()
)
return component
def _render(self):