Coder Social home page Coder Social logo

Comments (8)

fisshy avatar fisshy commented on June 1, 2024

When a link and an element is linked together with "to" and "name" and spy is set to true, there will be a listener on the scrolling event notifying the link when it's scrolling over that element to make sure it gets highlighted.

There's no scroll top now - maybe this is a good feature to have actually. Might rewrite some of the "scrollTo" logic to make sure it doesn't depend on elements or if someone else feels like doing it :)

from react-scroll.

hydrotik avatar hydrotik commented on June 1, 2024

Great thanks for the info. So is there an event I can listen to within the element that I could use to trigger an animation. For example click the link.. scroll to the element. When the scroll is complete then an event fires that I can use to trigger another event? Hopefully I am understanding you correctly:)

I can take a look at the code and see if I can make some time for a PR.

from react-scroll.

hydrotik avatar hydrotik commented on June 1, 2024

Also if I understood you correctly above, if you could share an example of hooking into that event, would be greatly appreciated!

from react-scroll.

fisshy avatar fisshy commented on June 1, 2024

Theres no callbacks at the moment - that's a good feature to have as well actually.
I might do some changes in the upcoming days if nobody else feels motivated to send a PR :)

from react-scroll.

hydrotik avatar hydrotik commented on June 1, 2024

That would be awesome, I tried to add a window scroll listener and pushed that info into the props and it was non performant visually. If there are callbacks then I can use the scroll event to trigger the animation. There might be a better performing way to handle it, but I haven't figured or come across it yet:)

Should I open another issue request for callbacks?

from react-scroll.

fisshy avatar fisshy commented on June 1, 2024

Yeah do that, this is possibly something I can solve tonight ;)

from react-scroll.

hydrotik avatar hydrotik commented on June 1, 2024

Ok Will do!

from react-scroll.

OhCoder avatar OhCoder commented on June 1, 2024

hey! this problem already have done yet?

from react-scroll.

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.