Handle resizing
Closed this issue · 2 comments
jordaaash commented
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 commented
Would love a PR for this!
developerdizzle commented
Version 2 does this!