-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I refresh my page, the fullpage always roll back to the first screen but hash value don't change. #46
Comments
I have same issue, but unfortunately, previous code didn't help. |
My way of fixing it is calling this method:
It's scroll to URL anchor when the viewport resizes |
It's a good idea!@dropsydice |
Is there a proper fix for this. |
Hey, The cleanest way I found is too pass a activeSection prop to the SectionContainer and update it with the scrollCallback the first time it's set. class Cmp extends React {
constructor() {
super();
this.state = {
initialActiveSection: null
};
}
onScroll(p) {
if (this.state.initialActiveSection === null)
this.setState(() => ({ initialActiveSection: p.activeSection }));
}
render() {
const { initialActiveSection } = this.state;
return (
<SectionsContainer
{...options}
activeSection={initialActiveSection}
scrollCallback={this.onScroll}
/>
);
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe this can solve :
SectionsContainer.js:
The text was updated successfully, but these errors were encountered: