Scroll to row of virtual table

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

I’m running Ant Design 3.xxx and using the VirtualTable with virtualizedtableforantd setComponents/VTComponents

However, when using it I cannot scroll to a specific row of the table that is not visible on the screen:

element.scrollIntoView();

A workaround that I’m doing is to make the Table temporarily non-virtual, scroll to the row, and then return it back to a virtual one However, this approach introduces a few issues, sometimes the Table rendering gets blank while switching from one mode to another and it doesn’t occur smoothly

It would be nice if using the table API we could scroll to an specific element without having to do this workaround even while using a virtual table

What does the proposed API look like?

tableRef.scrollToRow(row)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
shaodahongcommented, Jan 4, 2021

emm, Table not support ref, but can you try document.querySelector('div.ant-table-body').scrollTop = lastIndex * 100?

0reactions
ayzzanitycommented, Apr 8, 2022

emm, Table not support ref, but can you try document.querySelector('div.ant-table-body').scrollTop = lastIndex * 100?

i was actually looking for this, thanks!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I create a virtual table by reusing fixed number of ...
So I want to show it as a virtual table that render cells only when necessary. I know there is a way to...
Read more >
React Grid - Virtual Scrolling | DevExtreme Reactive
ID Name Gender City 0 Sandra Female Las Vegas 1 Paul Male Paris 2 Mark Male Paris
Read more >
Build your Own Virtual Scroll - Part I - DEV Community ‍ ‍
Building your own virtual scrolling (windowing) is not as hard as it sounds. We will start by building a simple one where the...
Read more >
JavaScript Data Grid Row virtualization - Handsontable
If the table contains enough rows or columns, it will be scrollable. The scrolling performance depends mainly on four factors:.
Read more >
Scroll row into view\top of table on select (virtual scroll\server ...
Scroll row into view\top of table on select (virtual scroll\server side data) ... Hi Folks, I have been struffling with the following issue......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found