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 answers
Related Questions in INFINITE-SCROLL
- Understanding Scroll Anchoring Behavoir
- Duplicate data is repeating in infinite scroll in react.js
- How can i make a infinite horizontal scroll that recibes input from mouse wheel with Javascript & React
- infinite scroll of primereact multiselect
- More optimize way to find whether user likes the post or not in infinite post feed
- ref not pointing to new item after re-render reacjs
- Apollo Client fetchMore doesn't merge previous and fetchMoreResult correctly in React app
- Creating Infinite horizontall scrolling ( like Ring )
- stack divs horizontally inside infinite div
- Loading an infinite table by incrementing page dynamically in htmx
- React InfiniteScroll issue
- React Native with RTK Query Pagination issue
- Smooth scrolling is causing extra pages to scroll unexpectedly
- Exception with PageController in Flutter: "A PagingController was used after being disposed"
- What is the best practice for scraping infinite scroll (one time scraping / progressing scraping)?
Related Questions in REACT-VIRTUALIZED
- Implementing collapsible toasts in react-virtualized
- scrollToRow() on List component with WindowScroller not working
- Bugged React virtualized list issue
- CSS Scrolling overflow content issue with absolute positioned items
- How to render doc to html converted data(html) into webpage
- Is getMenuProps necessary in React downshift autocomplete library?
- Why is my react-virtualized list not displaying scrollbar unless I make sure height is lower than rowCount*rowHeight?
- Virtualized (and synchronized) rows and columns in React
- React virtualized, Infinite Scroll - start at the bottom of List
- react-vertualize, scrollbar goes top directly when there is less data
- react-virtualized forceUpdateGrid method does not cause re-rendering with new data
- correct way to handle back event for the updated list in react native
- when loading control Component with custom menuList in react select the input-field is getting shorter
- onScroll is not working after React 18 upgrade
- How to combine React-Virtualized with Material UI grid or Bootstrap Gird?
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?
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)
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.