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

Does it support multiple level-0 nodes? #86

Open
quantrpeter opened this issue Jun 24, 2019 · 1 comment
Open

Does it support multiple level-0 nodes? #86

quantrpeter opened this issue Jun 24, 2019 · 1 comment

Comments

@quantrpeter
Copy link

Hi, Does it support multiple level-0 nodes?

@mrcat2018
Copy link

Unfortunately,but you can find way to support it .

<div className={'layer-context'}>
   <div className={"tree-container"}>
       <Tree
       paddingLeft={15}                  // left padding for children nodes in pixels
       tree={this.props.layers}          // tree object
       onChange={this.handleChange}      // onChange(tree) tree object changed
       renderNode={this.renderNode}      // renderNode(node) return react element
      />
   </div>);
</div>

`.layer-context{
overflow: hidden;
}

.tree-container{
height:inherit;
overflow: hidden;
position: relative;
top:-19px;
left: -18px;
}`
In this way ,it will render root but root will be hidden。
Attention root must contain element,or dragging will be wrong

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

2 participants