Skip to content
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

Fix virtual scroller for multiple columns with unequal children sizes #9

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

Conversation

tomaszwpasternak
Copy link

@tomaszwpasternak tomaszwpasternak commented Jul 27, 2024

I've noticed that after the latest changes related to calculations for unequal children, the virtual scroller stopped working for multiple columns with unequal children. This is because i and j are not the element indexes but rather the indexes of the groups. This causes only a part of the virtual scroll to render.

chrome-capture-2024-7-27

To fix this, I multiplied i and j by itemsPerWrapGroup, and now everything seems to work.

Copy link

@hborchardt hborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching the mistake I introduced. I recommend merging this 👍

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.

2 participants