chenglou / chenglou/react-treeview

Collapse/Uncollapse is slow with a large list of items

Open
#59 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.1k
Forks
155
PR merge metrics
No merged PRs in 30d

Description

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?

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.