Skip to content
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

Is there a way to retain scroll position when re-rendered? #6

Open
lkrnac opened this issue May 7, 2020 · 4 comments
Open

Is there a way to retain scroll position when re-rendered? #6

lkrnac opened this issue May 7, 2020 · 4 comments

Comments

@lkrnac
Copy link

lkrnac commented May 7, 2020

First of all, thank you, nice project.

Is there a way to retain scroll position when re-rendered (e.g. if I need to add/remove element is into/from data array)?

@stevensacks
Copy link
Owner

Sorry for the delay. Sure, I can make a Boolean prop for that. Glad you're finding this useful!

@lkrnac
Copy link
Author

lkrnac commented May 13, 2020

Thanks for the reply. For time being I created fork where I removed scrollToTop hook. I would drop the fork when new property would be created. Eventually let me know if you would accept contribution.

@dancomanlive
Copy link

Any news?

@stevensacks
Copy link
Owner

Apologies for my absence. I have rewritten the project in TypeScript and changed to rollup for distribution.

I tried to implement the changes in the fork, but when I tried to scroll, it didn't work. It stayed forever stuck at the top.

Now that the project is updated, I'm going to work on integrating this requested feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants