How to make infinite scrolling in both directions, up and down. I am using the InfiniteLoader and the List, both are react-virtualized components. I have a list of timestamps with initial date-time range. From there the list should be infinite in both directions. Currently, scroll-down to the bottom of the List will trigger the function _loadMoreRows(). However, I would like to trigger the _loadMoreRows() with the same functionality when scrolling in the direction up.
react-virtualized InfiniteLoader in both directions, top and bottom
2.7k Views Asked by sara.aleksi At
1
There are 1 best solutions below
Related Questions in INFINITE-SCROLL
- Infinite looped vertical slider with no pause
- Angular select scroll event not fired
- QtQuick2 - QML - create infinite moving line animation
- Infinite scroll on single.php with URL change
- RecyclerView deleting item doesn't call OnScrollListener
- Tumblr Like Buttons are Unclickable with Infinite Scroll
- How can I scrape the correct number of URLs from an infinite-scroll webpage?
- Mvc-infinite-scroll package null session
- Meteor pagination: cursor fetch limit with getmore
- How to create multiple Load More buttons on a page (WordPress)
- call a function when user scrolls near bottom of page
- Endless Scrolling Background jumps at certain Viewport sizes
- Detecting when the bottom of a scrollable div has been reached with an offset
- ng-repeat limitTo on page scroll to bottom
- Infinite Scroll: show elements between a range
Related Questions in REACT-VIRTUALIZED
- default sort column in react-virtualized table
- react-virtualized and react-custom-scrollbars integration
- autosizer scrollsync grid combi scrollwidth not updated
- How to wrap material-ui ListItem in react-virtualized autosizer
- React-Select loadOptions not working
- React Virtualized List scrolling out of view
- How to set up dynamic row height in react-virtualized List?
- React virtualized - Padding bottom on List
- JS grid performance comparison
- react-virtualized InfiniteLoader in both directions, top and bottom
- autoHeight with WindowScroller doesn't render full List
- @types/react-virtualized typings are producing TS errors
- React Virtualized AutoSizer + Masonry doesn't render until resized
- scrollToRow result is off for dynamic height list
- how to use scrollToIndex with infiniteLoader?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I have it working now :) Everything is fine. The
thresholdprop of the<InfiniteLoader>defines the threshold number of indices before the start/end of theListwhen to prefetch data, i.e. trigger_loadMoreRows().The first and the last item in
this.state.itemsshould have their correspondingloadedRowsMapset toundefinedafter the initial data fetch.Before displaying the list, a
scrollToIndexprop of the<List>component should be set to the middle of the list, i.e.rowCount/2. This number should satisfy the equationFunction
_isRowLoaded()will checkloadedRowsMap[index]. If it is set toSTATUS_LOADEDorSTATUS_LOADING(internal constants used inside theInfiniteLoader) it will not trigger_loadMoreRows(). If it is set toundefined, then it will trigger_loadMoreRows().With this setup, trigering
_loadMoreRows()works in both scroll directions, up and down.