-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include node info in rowHeight callback #199
Comments
@fritz-c I will make a pull request |
@fritz-c actually can you give me more context to this issue? or maybe I can pick up another issue since I am not sure what this issue is trying to do or solve |
Sorry for the delay. The issue here is that when people want to set the height per row with the A usage example: if I wanted to have rows that were twice as tall for nodes with a // API as it is now:
({ index }) => rowHeight
// API as I think it should be
({ index, treeIndex, node, path }) => rowHeight
// Nice-to-haves: lowerSiblingCounts, isSearchMatch, isSearchFocus
// -> Include these if they are available in the context and
// don't require extra calculation
// * Note that `treeIndex` and `index` should be the same value,
// I just want the APIs to be consistent in their naming. |
Is there any way to go around this? to have different heights based based on node data? |
@C3PablO Not right now. Would you be interested in adding the functionality? I believe it's only a matter of plugging in some extra variables into the callback call. |
yes, I think that would be very useful. For what I've seen around the issues, there was a fix for this in 1.3.0 (a906f21). No sure where that went. Another solution I'm looking at is the possibility of wrapping the cell into a CellMeasurer for rows where the height is difficult to guess so the node height is set based on the content. Think of it as a list of comments. |
That fix you refer to only applied to non-virtualized trees. For whatever reason I didn't notice the virtualized version didn't get any attention. |
@fritz-c if its not done already i can do it :) |
@wuweiweiwu yes please! |
#231 pull request submitted! |
Available now in |
No description provided.
The text was updated successfully, but these errors were encountered: