Lodin/react-vtree

How to update tree after dynamically modifying nodes height?

leefsmp opened this issue · 1 comments

Hi there! Thanks for offering that component, couldn't live without it!

I've been using it for a while without any roadblocks, however I'm trying to add a new feature:

I have a tree where nodes have thumbnails, looks as follow:

Screenshot 2022-11-06 at 17 03 47

I am now implementing a slider to control the size of the thumbnails, so basically node heights will depend of the value entered from the slider. I am passing a prop to the tree that is that height, used in node height computation. It works excepted that expanded nodes aren't being updated dynamically:

Screenshot 2022-11-06 at 17 04 00

To see the update I have to manually collapse/expand the parent:

Screenshot 2022-11-06 at 17 04 14

Any way to force the tree to re-render with correct height? Thanks for any insights.

instantly found recomputeTree after logging the issue