React-sortable-tree: Variable Height Nodes

Created on 31 Jan 2018  路  3Comments  路  Source: frontend-collective/react-sortable-tree

First off, this is an awesome project, thanks for sharing it!

We have been using your tree to implement a feature that, at times, will have a lot of text in some nodes and very little text in others. The hope was to allow word-wrap in each node and everything would be well and good. However after digging around I realized that rowHeight is global for all nodes, and seems to be used to position the nodes in the correct place.

Is there a way to have variable height set at each node to adjust to the content?

Thanks!

Most helpful comment

@mhiggs Were you able to get word wrapping working for the node titles? Can you explain how you implemented the .rstcustom__node snippet above?

All 3 comments

For future people who need something similar we were able to achieve this through unsetting styling in custom node css to allow for relative positioning, which solved for our use case.

.rstcustom__node {
    height: unset !important;
    position: relative !important;
    top: unset !important;
}

@mhiggs Were you able to get word wrapping working for the node titles? Can you explain how you implemented the .rstcustom__node snippet above?

Was this achieved?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anushkadoyan picture anushkadoyan  路  4Comments

29er picture 29er  路  5Comments

oarashi picture oarashi  路  5Comments

LogicMonsters picture LogicMonsters  路  5Comments

vladimirsvsv77 picture vladimirsvsv77  路  5Comments