react-smart-scroll icon indicating copy to clipboard operation
react-smart-scroll copied to clipboard

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

Open lkrnac opened this issue 4 years ago • 4 comments

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)?

lkrnac avatar May 07 '20 11:05 lkrnac

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

stevensacks avatar May 12 '20 08:05 stevensacks

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.

lkrnac avatar May 13 '20 07:05 lkrnac

Any news?

dancomanlive avatar Jan 31 '21 10:01 dancomanlive

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.

stevensacks avatar Oct 03 '21 13:10 stevensacks