Skip to content

Click on any item from page 2 onwards and it immediately jumps to the top of the list. How to conditionally retain scroll positions? #26

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

Open
slidenerd opened this issue Feb 5, 2025 · 0 comments

Comments

@slidenerd
Copy link

Image

How to retain scroll position conditionally?

What is the issue?

  • View page on desktop view where it shows list and detail side by side
  • Click on show more and go to page 2 or 3 or any number for that matter
  • Now click on an item

CodeSandbox Link

Here is a codesandbox illustrating the issue

Question

  • When filter or search changes, scroll position should be reset
  • When clicking on items, scroll position should be retained
  • How to retain scroll position conditionally using your library?
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

1 participant