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

Expanding rows in a virtualized table will cause it to scroll to top #656

Open
2 tasks done
dominictwlee opened this issue Jan 26, 2024 · 2 comments
Open
2 tasks done

Comments

@dominictwlee
Copy link

dominictwlee commented Jan 26, 2024

Describe the bug

When implementing expandable rows in a virtualized table, toggling an expandable row will immediately cause the table to scroll to top regardless of where the the current scroll offset is.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-virtual-xdmecx?file=src%2FApp.svelte

Steps to reproduce

  1. Scroll down table.
  2. Toggle on/off an expandable row.
  3. Table will immediately scroll to top.

Expected behavior

I expect to be able to toggle an expandable row and still be able to see it in it's current scroll position. Instead, It scrolls all the way to the top.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

MacOS, Brave browser v1.62.153

tanstack-virtual version

3.0.2

TypeScript version

^5.0.2

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@KevinVandy
Copy link
Member

Yeah it seems that anything that causes the count option to change will cause an automatic scroll to the top

@Gumichocopengin8
Copy link

im having the same issue. Are there any workaround or fixes?

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