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

Handle resizing #14

Closed
jordaaash opened this issue Aug 19, 2015 · 2 comments
Closed

Handle resizing #14

jordaaash opened this issue Aug 19, 2015 · 2 comments

Comments

@jordaaash
Copy link
Contributor

Right now, getVirtualState is called in 4 places: getInitialState, componentWillReceiveProps, componentDidMount, and onScroll. If the window is resized, or the orientation changes on mobile, this causes the list to display too few or too many items, depending on the change.

A listener on the window for resize and orientation change events to call getVirtualState would fix this (I do this my own wrapper for VirtualList in my application). I can PR if you're interested!

@developerdizzle
Copy link
Owner

Would love a PR for this!

@developerdizzle
Copy link
Owner

Version 2 does 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

No branches or pull requests

2 participants