Comments (8)
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.
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.
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.
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.
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.
Yeah do that, this is possibly something I can solve tonight ;)
from react-scroll.
Ok Will do!
from react-scroll.
hey! this problem already have done yet?
from react-scroll.
Related Issues (20)
- Active state not being properly set for some sections HOT 3
- TypeError new Nextjs App Directory HOT 3
- SEO issue? HOT 1
- It is not compatible with the latest Next.js. HOT 11
- element vs div id HOT 1
- React Scroll active wrong element
- How to scroll to section when it have image with dynamic height?
- Link is not scrolling correctly when containerElement has a border HOT 1
- Can Link component be given an href for the purposes of SEO? HOT 3
- My scroll not working from Footer to homepage HOT 2
- When "onClick" to close the menu is inserted, the menu does not scroll properly. HOT 1
- Add TypeScript Support to the Project HOT 2
- 'Link' cannot be used as a JSX component. HOT 11
- React Scroll is broken for newer versions of NextJs > 13.5 HOT 5
- scroller.scrollTo() is not working at all HOT 1
- Fail to update scroll listener in 1.9.0, due to wrong deduplication implementation HOT 2
- react-scroll.js target Element not found HOT 2
- ScrollSpy unable to reset or unmount
- outdated HOT 2
- Add Container: Prop to docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-scroll.