chenglou / react-treeview

Easy, light, flexible tree view made with React.
1.09k stars 165 forks source link

Collapse/Uncollapse is slow with a large list of items #59

Open royrwood opened 6 years ago

royrwood commented 6 years ago

I have a list of about 600 objects that I'm displaying with TreeViews, and things are really slow when I collapse/uncollapse a single item. My code is basically the same as the controlled example, so I think the problem is that the re-render call after I toggle the collapsed state for one of the objects results in a re-render of EVERYTHING in the list of objects.

I've taken care to ensure that the has a unique key and that the child

also has a unique key, but that doesn't seem to help React optimize the render.

Any thoughts, folks?

diogofcunha commented 6 years ago

@royrwood this project looks abandoned, you can try to use https://github.com/diogofcunha/react-virtualized-tree

royrwood commented 6 years ago

Thanks-- I'll take a look...

mindaugasnakrosis commented 5 years ago

@royrwood how did you solve it?