jcalebj

Results 11 comments of jcalebj

I came across the same problem as @svenadlung I have `rowHeight` set to: ``` rowHeight = ({ node }) => { console.log(node); if (!node.parent) { return 116; } else {...

Thanks for the comment @asynchub! I think the issue lies outside of having a custom `NodeRendererDefault`. In `react-sortable-tree.js` it seems like the renderRow function's `style` prop is different when `isVirtualized`...

So what if at this [line](https://github.com/fritz-c/react-sortable-tree/blob/master/src/react-sortable-tree.js#L666) there was: ``` style: { ...rowStyle, height: typeof rowHeight !== 'function' ? rowHeight : rowHeight({ index, treeIndex: index, node: row.node, path: row.path, }), },

@asynchub I spent the majority of the day yesterday trying to track down the reason for this behavior 😒 I traced it down through `ScrollZoneVirtualList` to `react-virtualized` and found this...

Yeah @asynchub @svenadlung , I found a solution for resetting the height correctly _after_ moving/dragging a node. To be clear, the issue is **not** with `react-virtualized`. `react-sortable-tree.js` is missing a...

@asynchub see my last comment for my findings

@asynchub I'll test that out today

@asynchub I believe if you call `recomputeRowHeights` within the render that that's an anti-pattern. Are you not getting warnings in your console from that? To be clear, did you get...

@wuweiweiwu Is there a reason for labelling this issue 'enhancement' and not 'bug'? This is a known problem with current documented functionality. Re-sorting a node when `isVirtualized` and `rowHeight` set...

Hi @svenadlung, I opened a PR that fixes one part of the problem (on drop, but not while dragging). But the PR is lacking some test coverage at the moment....