Fix custom component render (#517)

This commit is contained in:
Nikhil Rao 2023-02-11 16:49:06 -08:00 committed by GitHub
parent 5e0d5b9e2e
commit 29d46facb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -557,6 +557,14 @@ class CustomComponent(Component):
custom_components |= self.get_component().get_custom_components(seen=seen)
return custom_components
def _render(self) -> Tag:
"""Define how to render the component in React.
Returns:
The tag to render.
"""
return Tag(name=self.tag).add_props(**self.props)
def get_prop_vars(self) -> List[BaseVar]:
"""Get the prop vars.