Git Product home page Git Product logo

Comments (13)

bvaughn avatar bvaughn commented on May 5, 2024

Hi @x4080,

You're welcome and thank you. I'm afraid I don't understand your question though. Could you provide some more information?

react-virtualized components just react to scroll events and shift around a pool of visible rows/cells within the overall scrollable container. I don't actually make use of wheel events or their deltas.

from react-virtualized.

x4080 avatar x4080 commented on May 5, 2024

Sorry for the confusion, yes, after i saw the code, it is not using translate like for example iScroll, maybe we can add onWheel event then animating the scrollTop by using requestAnimationFrame? for desktop I think its quite performance, of course with preventDefault first?

Thanks

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

I'm fairly reluctant to do that. It seems like it might complicate the components, which in turn might introduce new bugs or slow things down, etc.

I'd be happy to look at a pull request if you'd like to put something together though. :)

from react-virtualized.

x4080 avatar x4080 commented on May 5, 2024

Allright then, i ll try :)

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

You might want to fork off of the v5 branch for convenience. In that branch, the VirtualScroll and FlexTable components are both just HOCs for the Grid- so it gives you a single place to try out your wheel handler.

Or you could just build a proof-of-concept as part of VirtualScroll only. :)

from react-virtualized.

x4080 avatar x4080 commented on May 5, 2024

thanks for the tip, honestly im kinda new in this react thing, so dont hold your breath ;)

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

No problem. I started with React in September so I can still remember being new to things. :D

Your idea sounds interesting. I just have limited bandwidth with work and all, and I don't feel confident I have enough time to really explore it. If you can create a compelling proof of concept though, I'd love to see it.

Good luck!

from react-virtualized.

x4080 avatar x4080 commented on May 5, 2024

Cool, I created prototype that can hook wheel to smooth scrolling with easing and because its using request animation frame , the wheel can just flip from scroll down to up

It just needs the scroll container element and the content element using react Dom, I suppose your code already have this information?

If you like I'll post my sample code here so you can play with it and integrate with your code

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Hm. Feel free to link the sample, but as I mentioned before- I don't have a lot of bandwidth to work on this right now. By "prototype" I was thinking more... of a branch of react-virtualized that did this. ;)

from react-virtualized.

x4080 avatar x4080 commented on May 5, 2024

allright then i'll try to combine with your code and will let you know

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

I'm going to close this issue for now as it's not something I intend to tackle myself. We can continue to discuss things on this issue though and I would be happy to look over any prototypes or PRs you create.

Right now I'm focusing on getting a fix for #2 (which seems possible at the moment) and that makes me extra wary of custom scrolling behavior. It seems like an area that would need a lot of profiling and testing.

from react-virtualized.

x4080 avatar x4080 commented on May 5, 2024

Sure man, congrats for new release too

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Hey thanks. That's very kind of you. :)

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.