Git Product home page Git Product logo

Comments (6)

bvaughn avatar bvaughn commented on May 5, 2024

Hi @aquach,

Correct me if I'm wrong, but you should be able to use the onRowsRendered callback (supported by FlexTable and VirtualScroll) for this purpose. I suspect what you care about is the range of rows rendered (or the fact that they've changed) and not the actual scroll position.

This callback's signature is expected to be: ({ startIndex, stopIndex }): void

Going to close this issue as answered (because I think it is) but please comment again if you have more questions or if this isn't an adequate answer. :)

from react-virtualized.

aquach avatar aquach commented on May 5, 2024

I actually need it to support our existing in-house infinite loading code, which checks to see if one's scrolled close to the bottom of available content. I suppose onRowsRendered is a more quantized way to do that. If implemented via onRowsRendered, it may interact poorly with #53. If many extra elements are rendered, the client may not be able to use onRowsRendered to reliably detect scrolling close to the end of the content.

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Have you considered using the InfiniteLoader component for this? (Sorry if we've already talked about this.)

The implementation for #53 will allow you to configure the number of overflow rows rendered, so you would have to take that into account within your own onRowsRendered callback.

from react-virtualized.

aquach avatar aquach commented on May 5, 2024

Our infinite loading is date-based rather than index-based and comes with a bit of extra domain logic, so integrating the infinite loader would take some extra effort. We opted to stick with what we already had. Thanks for asking though!

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

I see. Always interesting to hear about different project's requirements. :)

I do strongly prefer the use of the onRowsRendered callback for this purpose though. I'd rather avoid adding another callback for scrolling because I think it may muddy the interface and confuse people. (Ideally no one should care about the inner dimensions/offsets of virtualized components, only which rows are visible at any given time).

Let's chat again once I've got an implementation for #53 up though and we'll see if we can't work something out. :)

from react-virtualized.

aquach avatar aquach commented on May 5, 2024

Sure thing, thanks for being so responsive!

On Wed, Jan 13, 2016 at 4:10 PM Brian Vaughn [email protected]
wrote:

I see. Always interesting to hear about different project's requirements.
:)

I do strongly prefer the use of the onRowsRendered callback for this
purpose though. I'd rather avoid adding another callback for scrolling
because I think it may muddy the interface and confuse people. (Ideally no
one should care about the inner dimensions/offsets of virtualized
components, only which rows are visible at any given time).

Let's chat again once I've got an implementation for #53
#53 up though and
we'll see if we can't work something out. :)


Reply to this email directly or view it on GitHub
#60 (comment)
.

from react-virtualized.

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.