frontend-collective / frontend-collective/react-sortable-tree

passing props to the treeNodeRenderer

Open
#295 1 comment 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
JavaScript
Stars
5k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

# Requesting a Feature `generateTreeNodeProps`

* What's your use case?
I set `isVirtualized` to `false` and use dynamic rowHeights.
I removed all `lineHalfHorizontalRight` except for the last children element. For the last elements without further children i need to remove all lines. See picture below.
![image](https://user-images.githubusercontent.com/1577842/39317178-41059502-497b-11e8-93d8-a25768fb66a8.png)
I want to know if `node` is one of the last nodes without children and hide the lines. Therefore i need more info about the tree in the `treeNodeRenderer`.

* What interface do you have in mind?
I think it would be helpful to be able to pass props to the `treeNodeRenderer` similar to `nodeContentRenderer` with `generateNodeProps`.

If you any other solution, i would be glad to hear :)
I removed the horizontal lines, because i made the children expandable and was not able to place the horizontal lines on the icon-boxes as they are part of a bigger container.
If i would be able to either remove the line or place correctly i would be happy :)

Sincerely
Faruk

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.