react-ui-tree
react-ui-tree copied to clipboard
Only one top node?
Is the component limited to one top node or is this in some way configurable ?
Yes, a root node is required for the json tree.
@wangzuo Is it possible to allow not to render the root node itself?
@icodeforyou @wangzuo I've implemented code to enable the root node to not be rendered. shouldRenderRootNode can be passed as prop to tree and default is true. Want a pull request for this?
This will enable the view to have the look of many rootnodes but there is still only one.
@edgesoft Cool, would like to take a look at it.
But will it also be possible to make it through css only?
@wangzuo But if we set visiblity to none on the rootnode we will prevent the entire tree to render. Do you have any suggestion on how to make this possible with css?
@wangzuo Maybe
color: transparent;
background: transparent;
I just select the first node and hide it.
.m-tree > .m-node > .inner { display: none; }
@dannav @wangzuo This works great. Only need to reset the padding. Should I delete the pull request?
No, i will check the pr later.