I'm trying to use InfiniteLoader
from the react-virtualize
library to show up a scrollable list that has a textSearch
input field on top (used to filter list entries).
The code I use is very close to the InfiniteLoader Sample Code.
The list is working fine, but I'm not sure how to reset/initialize the InfiniteLoader
when the searchText
is changed and (completely) new data should be shown.
The flow is like this:
- the list is opened for the first time and shows data from the
redux store
(works fine). - user changes
textSearch
and new data is fetched to thestore
- at this point,
InfiniteLoader
should be be initialized (I tried callingresetLoadMoreRowsCache
onInfiniteLoader
) InfiniteLoader
should callloadMoreRows
like for the first time and rerender with the new data
I've seen that the INFINITELOADER DEMO has the same behaviour: by clicking 'Flush Cached Data' nothing happens until I start scolling the list.
So my question: what is the right way to reset/initialize?