Unable to load more results when initial list loaded is smaller than container
See original GitHub issueHi, really liking the library.
https://codesandbox.io/s/distracted-bogdan-zhcit?file=/src/index.js The above is a working example of inverse scrolling within a fixed height container of 300px.
If you modify the height (line 35) to 800px you’ll see an initial load that looks like:
There doesn’t seem to be any way to then trigger loading the next page of data.
Would this be something that would be possible to be addressed in this library?
If there is no scrollbar, but there is still more data to fetch, then trigger the next
function until there either is a scrollbar or there is no more data to fetch?
Maybe you there is an alternative way to tackle this that I’m not thinking of as well.
Tested on
- Chrome Version 86.0.4240.75
- macOS Mojave Version 10.14.6
Issue Analytics
- State:
- Created 3 years ago
- Reactions:38
- Comments:12
Top Results From Across the Web
How to load more search results when scrolling down the ...
I work with google API book and I would like to load just 10 searching results and if user scroll to the last...
Read more >React Hooks for infinite scroll: An advanced tutorial
This will be used to conditionally hide the “Load More” button when all items are loaded; This makes sure the page is populated...
Read more >Preventing Content Reflow From Lazy-Loaded Images
Lazy loading doesn't guarantee that the image will fully load before it enters the viewport. The result is a perceived janky experience, even ......
Read more >Lazy Loading Images – The Complete Guide - ImageKit.io
Let's first look at the more common of the two, the <img> tag, and then move on to CSS background images. The general...
Read more >SQL OFFSET FETCH Feature: Loading Large Volumes of ...
In reality, smaller companies can't always adopt new storage, ... a SQL query and needs to show the results on several pages where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ADCrouch I ended up figuring something out, tried to recreate it in CodeSandbox. It’s a little bit rough around the edges and I couldn’t test the window resizing part but it should be a good enough starting point. https://codesandbox.io/s/vibrant-shannon-05o50?file=/src/Scroller.tsx
The logic is really just, if I’m not scrollable, there’s still data to be loaded, and I’m not already loading, then load some more data. 😄
It would be super-nice if this logic were built in to react-infinite-scroll-component: If the element isn’t scrollable but more items are available, request more items.