frontend-collective / frontend-collective/react-sortable-tree
tree does not render nodes
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
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)
```jsx
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 (
this.setState({ treeData })}
getNodeKey={({ node }) => node.id} />
);
}
}
```
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.