Coder Social home page Coder Social logo

Comments (6)

ankeetmaini avatar ankeetmaini commented on July 24, 2024 11

@sshadmand ideally you shouldn't give overflow-y: scroll to the parent container. This InfiniteScroll component takes a prop height and makes it scrollable automatically after that height. So you should be good to go!

<InfiniteScroll
          next={functionToLoadMore}
          hasMore={true}
          height={300} // this is what I am talking about
          loader={<h4>Loading...</h4>}>
          {yourData}
        </InfiniteScroll>

If you still can't get it to work, can you share a JSBin where I can take a look?

from react-infinite-scroll-component.

rajivhbk avatar rajivhbk commented on July 24, 2024 2

I'm facing a similar issue. I can't add height as giving height gives my table another scrollbar. I've my scroll able element already defined. I tried passing ref to parent element having overflow-y: scroll to the "scrollableTarget" prop but it didn't work for me.

from react-infinite-scroll-component.

ankeetmaini avatar ankeetmaini commented on July 24, 2024

Closing this issue for now, do let me know if it still doesn't work for you. You can even refer the demo file in the directory demos/height.js

from react-infinite-scroll-component.

IdelCoder avatar IdelCoder commented on July 24, 2024

@sshadmand ideally you shouldn't give overflow-y: scroll to the parent container. This InfiniteScroll component takes a prop height and makes it scrollable automatically after that height. So you should be good to go!

<InfiniteScroll
          next={functionToLoadMore}
          hasMore={true}
          height={300} // this is what I am talking about
          loader={<h4>Loading...</h4>}>
          {yourData}
        </InfiniteScroll>

If you still can't get it to work, can you share a JSBin where I can take a look?

Great, that's it. Thanks!

from react-infinite-scroll-component.

dquanghuy4444 avatar dquanghuy4444 commented on July 24, 2024

@sshadmand ideally you shouldn't give overflow-y: scroll to the parent container. This InfiniteScroll component takes a prop height and makes it scrollable automatically after that height. So you should be good to go!

<InfiniteScroll
          next={functionToLoadMore}
          hasMore={true}
          height={300} // this is what I am talking about
          loader={<h4>Loading...</h4>}>
          {yourData}
        </InfiniteScroll>

If you still can't get it to work, can you share a JSBin where I can take a look?

Thank u so much

from react-infinite-scroll-component.

AGSTRANGER avatar AGSTRANGER commented on July 24, 2024

Is there a way to make the height equal to the parent element?

from react-infinite-scroll-component.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.