Skip to content

do not render items if the react list is hidden #192

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elisei-timofte
Copy link

I have some columns on the same page that uses react-list. In each one I have 200 items. Seven are visible in the portview, and 13 are rendered, I load more on scroll.

When I open a column item in fullwidth, all the other columns are hidden (display: 'none';). Here my problem started with react-list.

The viewport of those columns was 0 (they are hidden, remember?). and some how react-list started to render all the 200 items for every column.

The end was getting bigger and bigger from the threshold (let end = scroll + this.getViewportSize() + threshold;. react list was rendering more items are soon as there was more space)

This caused big performance issues in my app. What I've tried to achieve here is to stop react list on rendering items when it is hidden (display: 'none';).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant