You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tables don't scroll back to top on page change #55
I investigated the failure of tables to scroll to top on pagination because I was surprised it wasn't happening. I haven't seen anyone defend pagination without scrolling to the top of the new page as a desirable UX. Unfortunately, there's a won't-fix bug for it in TanStack tables, which we're using (#772). So I'm documenting it for the record.
The suggested workarounds are unsatisfactory because we have a lot of tables we'd have to edit, and, because we have multiple tables on a page, we can't just scroll to the top of <tbody> (which is the equivalent of the suggestions involving a class name). I found a more general react-hacking workaround, for a similar component with a similar won't-fix scrolling problem: #902, which might work for us. (Even though the commenter says it scrolls to the top of the page, it looks like it scrolls to the top of the table.)
I couldn't find a different table component that does this out-of-the-box.
Activity
Perlkonig commentedon Jul 3, 2025
Many thanks for your research here. I will look more closely at the links when I can.