question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is the Height mandatory?

See original GitHub issue

<div style={{ height: 400 }}> <SortableTree treeData={this.state.treeData} onChange={treeData => this.setState({ treeData })} /> </div>

In the snippet above, does the height:400 of the outer Div section mandatory?? When i provide height:auto, the tree is not displaying.

Want to make the height auto-adjustable according to screen size without restircting the height.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

34reactions
MattCowskicommented, Dec 15, 2018
import SortableTree, { getVisibleNodeCount } from "react-sortable-tree"
...
const count = getVisibleNodeCount({treeData:this.props.treeData})
style={{height: count * 62}} // height of each node
0reactions
Imagine-Fcommented, Aug 14, 2020

@MattCowski Thank you sir ❤️ but this affects the performance pretty much since he calculates the height for every action you do. So a good solution for little applications but if your treeview is big be careful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NBA Rules: Is there a height requirement for the NBA? - MARCA
It's a cliché as old as time, to be good at the basketball you must be more than six feet tall. However, just...
Read more >
Why is height important in the military? - Quora
Most of us are in the 5′6″ to 6′ area. Physical strength is required, but height is not important. Many pilots are in...
Read more >
CM-621 Height & Weight Requirements
The result is that, if meeting a minimum height or weight limit is a requirement for employment, these protected group members will most...
Read more >
At What Height is Fall Protection Required? - Simplified Safety
Just as in the ladder standard, should that employee need to climb to a height greater than 24', they would be required to...
Read more >
Height requirement definition and meaning - Collins Dictionary
Height requirement definition: The height of a person or thing is their size or length from the bottom to the top. [...] |...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found