frontend-collective / frontend-collective/react-sortable-tree
Attempting to dynamically assigning rowHeight, I got stuck
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
Long story short, I could do this:
1. After the SortableTree Component is rendered for the first time, measure the heights of the contents of nodes
2. Add a height property to the node objects in this.state.treeData array.
3. The rowHeight function takes the node as an argument and returns node.height
The problem here, however, is that the rowHeight function is called only during the first render. So changing the node.height after the first rendering has no meaning!
How can we solve this problem? I would appreciate it if you gave me a hint.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.