Questions tagged [react-infinite-scroll]

12 questions
17
votes
3 answers

Infinite loading with react-table + react-virtualized / react-window

I have the following requirements to my table: Table should have fixed header It needs to autosize: for infinite scroll to work the first fetch should get sufficient amount of data for scroll to appear at all. table body should work as infinite…
5
votes
1 answer

How to use react-infinite-scroll-component inside a Material-UI Dialog modal?

I'm using react-infinite-scroll-component in a project and it works fine outside a Dialog. When I scroll to the bottom of a page, the next set of data is fetched from the server but I can't get the same action inside my Material-UI Dialog. Here's…
3
votes
1 answer

next prop not working in react-infinite-scroll-component

The infinite scroll component is in a table and its inside a scrollable page. i tried giving id="scrollableDiv" to every div in the page and also in index.html still no use. when i remove the scrollableTarget="scrollableDiv" the fetchdata…
1
vote
1 answer

Infinitely scrollable list won't load more data

I have an infinitely scrollable component, I want it to load more data when the users scrolls to the bottom of the page but it just loads the first set of data and then stops. Below is my code: import { Avatar, List, Spin, message } from…
K. Martin
  • 73
  • 13
1
vote
1 answer

React infinite-scroll with array from hook state

I'm having troubles to set up react-infinite-scroller within my React component. I do not want to fetch data via an API directly in my component with loadMore because I already got it from my IndexedDB. So I want to use my Array dbScans (array with…
mrks
  • 5,439
  • 11
  • 52
  • 74
0
votes
1 answer

how we can fetch new data when scrolling both directions(up and down)

I have created an infinite scrolling using react-virtouso. and it is working proper too. in the given example it fetch data when we scroll-down and when we reach on the end, and it append to existing data. when we scroll-up it show the already fetch…
0
votes
0 answers

react-infinite-scroll-component not triggering fetchMoreData function to fetch new Post when scrolled down

I am currently working on an app to fetch more posts and am currently using react-infinite-scroll-component. My Layout is structured in this format The header ._dashboard__header{ max-height: 8rem; /* height: 10vh; */ padding: 1rem…
0
votes
0 answers

RollupError: "default" is not exported by "node_modules/react-infinite-scroller/index.js"

Using v1.2.6 of react-infinite-scroller in a reactjs .tsx bumps into the following build error: [!] RollupError: "default" is not exported by "node_modules/react-infinite-scroller/index.js", imported by…
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85
0
votes
1 answer

[React][useInfiniteQuery] How to restrict the first fetch call to happen only when the view is visible in the viewport

I am using useInfiniteQuery hook for infinite scrolling items in my component. I want that the first fetch happens only when the view is visible in the viewport . I am using useInView/intersection observer for finding if the view is visible in…
0
votes
1 answer

Infinite Scrolling is not working while fetching data

I'm trying to fetch the news in my infinite scrollbar but it is not working properly and every time I run this code my laptop get stuck. import React, { Component } from "react"; import NewsItem from "./NewsItem"; import Spinner from…
0
votes
1 answer

React infinite scroll component - dataLength not working

I have a function newsFeed which is called by useEffect and makes a request to an endpoint to fetch all posts made by the logged in user as well as any users they follow, and then saves the data response to the state: const [posts, setPosts] =…
-1
votes
1 answer

Redux Saga - React Infinite Scroll - two api call on load

I am using redux saga and react infinite scroller(https://www.npmjs.com/package/react-infinite-scroller) I have 10 records in a single API call but it display 20 records on load of page. It is making two API call on load. Don't know why. Here is my…
Bhumi Shah
  • 9,323
  • 7
  • 63
  • 104