We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d99422 commit 285ab75Copy full SHA for 285ab75
tdom/transformer.py
@@ -175,6 +175,13 @@ def interpolate_component(
175
callable_info = get_callable_info(component_callable)
176
kwargs = _prep_component_kwargs(callable_info, resolved_attrs, system=system_dict)
177
res = component_callable(**kwargs)
178
+
179
+ # @DESIGN: callable or has_attr('__call__') for class components?
180
+ if callable(res):
181
+ # Class components are built and returned and then need to be called
182
+ # to get their template.
183
+ res = res()
184
185
# @DESIGN: Determine return signature via runtime inspection?
186
if isinstance(res, tuple):
187
result_template, comp_info = res
0 commit comments