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: return empty list when size is 0 #53

Merged
merged 1 commit into from
Aug 26, 2020
Merged

fix: return empty list when size is 0 #53

merged 1 commit into from
Aug 26, 2020

Conversation

mogelbrod
Copy link
Contributor

The range state doesn't update in response of changes to size until the layout effect is applied. I don't want to update state within the render function, so adding a guard seems like the best approach.

Fixes #52
Might fix #49

@adbayb
Copy link
Contributor

adbayb commented Aug 26, 2020

@mogelbrod Is it possible to add a test to avoid future regressions ? Thank you

@tannerlinsley tannerlinsley merged commit 856100a into TanStack:master Aug 26, 2020
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 2.2.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

virtualRow will contain one empty item when size is 0 (since v2.2.4) virtualRow.index is sometimes NaN
3 participants