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:
parent
f3b8b2e336
commit
5ff2f817be
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user