lukasbach / react-complex-tree

Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop
https://rct.lukasbach.com
MIT License
886 stars 69 forks source link

TypeError: Cannont read properties of undefined ( reading 'tree-1') #384

Open EasyCanadianGamer opened 1 month ago

EasyCanadianGamer commented 1 month ago

Describe the bug Well when I run the the sample code in my code, the UI is doesn't render.

To Reproduce Steps to reproduce the behavior (ideally a codesandbox link or similar if for a library issue): CodeSandbox

Expected behavior Its gives a white screen showing that the tree is not being displayed Screenshots If applicable, add screenshots to help explain your problem. A gif or screencast can also help understand your problem.

Also here is the screenshot of the errors I get from the console: image

This is without the Error Boundary tags from React: image

This is with the Error Boundary tags from React ( the something went wrong is where I want to put the tree like a code editor from vscode) : image

Additional context You can help by providing additional details that are available to you, such as

lukasbach commented 1 month ago

Hey, thanks for your report. I tried your sandbox link, but it looks like there is something wrong with the JS import, the main JS file doesn't run at all.

That said, can you try adding viewSate={{ "tree-1": {} }} as prop to the tree environment to see if that does something?