-
Notifications
You must be signed in to change notification settings - Fork 579
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
Preserve Scroll Position through history from React Router #146
Comments
There's a closed issue for this over at One solution (from what I understand) would be modifications to scroll-behavior to support providing custom scrolling behavior via props, overriding the default |
For reference, I've implemented this via the API and Redux. First, add a When the component is mounted again, the value from the store is used to call |
@cdtinney I'm trying to do that but the |
@cdtinney I have the same setup but see a flash from the scrollTop 0 to the saved position. How did you deal with that? |
What do you mean by flash?
…On Thu, Apr 25, 2019, 06:14 Cam Tullos ***@***.***> wrote:
@cdtinney <https://github.com/cdtinney> I have the same setup but see a
flash from the scrollTop 0 to the saved position. How did you deal with
that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAY5L72VMRBBME65LWCECW3PSGVEHANCNFSM4DIH7DAA>
.
|
@cdtinney do you have a working codepen? |
The default scroll bars preserve scroll position when going back and forward through history with react router historys goBack calls.
For example if I'm on a list of all products page, and I scroll half way down, and I click in to a product page, and then hit back, the previous scroll position is preserved and used. I go back to the product list half way down.
This does not happen with this these custom scrollbars and I would like it to. Any ideas?
The text was updated successfully, but these errors were encountered: