Closed gazpachu closed 6 years ago
Correction: the onClick
event in the AnchorLink
doesn't work either
I'm wondering for which use case scenario you'll need the hash to be in the address bar?
I.e. a top nav with links that when clicked scroll to the given section. After the animation ends, the address bar will get the hash of the section, in case the user decides to share a link to that page and section. Like in the wikipedia articles.
By the way, I fixed the onClick issue by adding an 'if' to the last expression inside the SmooScroll method:
If (this.props.onClick) this.props.onClick(e);
If you want to create a pull request with the fix I'll be happy to include it. Thanks for your enquiry.
It might not be an issue, but I've noticed that, after changing my
a
tags toAnchorLink
, the hash in the address bar doesn't change any more.It could be fixed by adding an
onClick
event to the AnchorLinks and setting manually the hash, but I was wondering if we could add this feature to the module.Thanks!