Add an extra option isLoading
See original GitHub issuecurrently, we only have an option hasMore
to indicate if we have more options or not. In the code, we have hasMore &&
to show or not the Loader
(spinner).
The problem is: If I set hasMore
to true, I get the Loader
in the screen, but the component does hundreds of requests. If I set hasMore
to false when I’m doing the request, I avoid the hundreds of requests, but I don’t get the Loader
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9
Top Results From Across the Web
React-Select : How to display 'Loading...' while loading options
You can achieve this by creating a variable in your state that will hold the status of the loading. You then set this...
Read more >Components - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >Add/Remove options from select box - ServiceNow Community
Solved: Hello! In a catalog item, i have 2 variables, VAR A and VAR B. Var A has 2 options - Option 1...
Read more >Mutations | TanStack Query Docs
For this purpose, React Query exports a useMutation hook. Here's an example of a mutation that adds a new todo to the server:...
Read more >Queries - Redux Toolkit
If the query callback needs additional data to generate the URL, it should be written to take a ... Example of all query...
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
@gautier-lefebvre Thanks for your advice. Indeed, that would work!
But I think, as we already have a loader in the component, let’s make it work properly.
I created a wrapper component that accepts the isLoading props. Then, instead of using react-infinite-scroller directly, I just use my wrapper: