Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering hangs when there are React elements in node name #62

Open
migichen opened this issue Apr 28, 2022 · 0 comments
Open

Rendering hangs when there are React elements in node name #62

migichen opened this issue Apr 28, 2022 · 0 comments

Comments

@migichen
Copy link

migichen commented Apr 28, 2022

The browser page hangs or is very slow when there are some (like 10+) nodes with React elements. Here is simplified code:

<SuperTreeview
    data={this.state.data}
    ...
    />
...
this.setState({
  data: [
  {id: 0, name: (
    <span id="item">
        <a href={"http://www.example.com/"}>example</a>
        <span className="mx-1">
          - some time stamp
        </span>
      </span>) }
, ...(repeat above  10+ times)
]}

Loading the page initially should be ok. But if I click on a checkbox or expand a node, the page starts to hang.

When the page is about to hang, from browser debugger I see very deep call stack starting from the _find2. I guess the issue with the usage of _find2 is that it recursively looks into the deep React element tree. This seems an implementation flaw. As this project seems not active recently, please let me know any workaround. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant