Skip to content

How to create tree with 1+n roots? #48

New issue

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

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

Already on GitHub? # to your account

Open
Frit opened this issue Nov 2, 2016 · 1 comment
Open

How to create tree with 1+n roots? #48

Frit opened this issue Nov 2, 2016 · 1 comment

Comments

@Frit
Copy link

Frit commented Nov 2, 2016

tree field is waiting for object
e.g.
state = { tree: { "module": "first-root", "children": [somechildren] } }
but what if I need 1+n roots?
I've tried to create tree without first module >
state = { tree: {"children": [somechildren] } }
and in the renderNode function added
if (!node.module) { return null; }
renders fine, but now draggable element has padding(shifted), because root doesn't contain node.
Need structure example:
state = { tree: [ { "module": "first-root", "children": [somechildren]}, { "module": "second-root", "children":[somechildren]}, etc. ]}

@Frit Frit changed the title How to create tree with 2+n roots? How to create tree with 1+n roots? Nov 2, 2016
@maebert
Copy link

maebert commented Jun 26, 2018

Possibly related to #68

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

No branches or pull requests

2 participants