Tree not rendering at all when inside a Material UI Paper object.. crazy
rchancey opened this issue · 3 comments
Reporting a Bug?
If I have the tree by itself it works fine.. if I wrap it run a Paper from Material UI.. the entire thing disappears.. including the Paper?
literally from this:
<SortableTree treeData={treeData} maxDepth={3} theme={FileExplorerTheme} dndType={'recommendation'} canDrop={self.canDrop.bind(self)} generateNodeProps={self.getNodeProps.bind(self)} />
to this:
<Paper> <SortableTree treeData={treeData} maxDepth={3} theme={FileExplorerTheme} dndType={'recommendation'} canDrop={self.canDrop.bind(self)} generateNodeProps={self.getNodeProps.bind(self)} /></Paper>
it stops rendering
any idea why this would be the case? just maddening! :-(
I made a fork of this library. I think your issue also was resolved.
yarn add @nosferatu500/react-sortable-tree
Because I had the same problem with Ant Design and I solved it in my fork.
But it doesn't provide types for Typescript.
You can resolve it by following these steps:
#855 (comment)
Thank you for responding.. I had the same issue with Div and I accidentally added a height and it worked. Somehow it won't render inside another element unless there is a height on the parent element.. perhaps the fix above addresses that but just wanted to share.