Skip to content

Commit

Permalink
Include child imports in markdown component_map (#3883)
Browse files Browse the repository at this point in the history
If a component in the markdown component_map contains children components, use
`_get_all_imports` to recursively enumerate them.

Fix #3880
  • Loading branch information
masenf authored and adhami3310 committed Sep 9, 2024
1 parent d29e2c1 commit 7ad4016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reflex/components/markdown/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def add_imports(self) -> ImportDict | list[ImportDict]:
),
},
*[
component(_MOCK_ARG)._get_imports() # type: ignore
component(_MOCK_ARG)._get_all_imports() # type: ignore
for component in self.component_map.values()
],
CodeBlock.create(theme="light")._get_imports(), # type: ignore,
Expand Down

0 comments on commit 7ad4016

Please sign in to comment.