question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tree does not render nodes

See original GitHub issue

hello, im using the basic example on my Nextjs project only thing i added is NoSsr component to prevent server side rendering (otherwise it fails)

import React from "react";
import Typography from "@material-ui/core/Typography";
import NoSsr from '@material-ui/core/NoSsr';
import SortableTree from 'react-sortable-tree';

export default class MapComponent extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      treeData: [{ id: '1', title: 'Chicken', children: [{ id: '1.1', title: 'Egg' }] }],
    };
  }

  render() {
    return (
      <div style={{ height: 400 }}>
        <Typography variant="caption">
          <NoSsr>
            <SortableTree
              treeData={this.state.treeData}
              onChange={treeData => this.setState({ treeData })}
              getNodeKey={({ node }) => node.id} />
          </NoSsr>
        </Typography>
      </div>
    );
  }
}

in browser, i can see that it renders:

  • DragDropContext — ReactSortableTree ---- Scrolling ----- List ------ Grid

it pass the treeDada props all the way down but the tree nodes doesn’t getting rendered any ideas?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:11

github_iconTop GitHub Comments

6reactions
jonthompcommented, Apr 25, 2019

I’m seeing this on a new project too, setting isVirtualized={false} works as a temporary solution

4reactions
noushad-ppcommented, May 21, 2019

I faced the same issue and as @jonthomp mentioned, setting isVirtualized={false} fixes the issue. Also setting an explicit height to the container does fixes the issue too.

I am guessing its because react-virtualised or the whichever library used under the hood for virtual scrolling needs a container with height value rather than auto to work properly…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tree View does not render child nodes - Theia Community
Hi all,. i'm trying to get a custom tree view working in Theia, but somehow the child node is not rendered. The root...
Read more >
Tree component is not rendering properly - Stack Overflow
I have used this link https://material.angular.io/components/tree/examples, but its not rendering same as example shown in link. app. component.
Read more >
No render output node in scene - Blender Stack Exchange
Here is a screenshot of all my nodes and the error after trying to get it to render. Pretty sure this is because...
Read more >
RadTreeView IsVirtualizing not rendering all tree nodes - Telerik
I'm having an issue when I expand a node with many children only the first 20 or so out of 1500 are rendered...
Read more >
Render Nodes ⁠— Right-Click Select
The current way of setting up multiple render layers is not great. ... Flexible, job-oriented workflow : from a gral settings node tree,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found