-
Notifications
You must be signed in to change notification settings - Fork 404
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
How to scroll to a specific line on vue good table #966
Comments
You can scroll to a specific line in a Vue Good Table using the "vue-scrollto" library. Here's how you can achieve this: First, import the scroller from "vue-scrollto":
Define the scroll options. You can customize these options based on your requirements:
Determine the element you want to scroll to. In this example, we're using a CSS selector to target the specific row you want to scroll to:
Finally, use the scrollTo function to perform the scroll. You can specify the element to scroll to, the duration of the animation (800 milliseconds in this example), and the scroll options you defined earlier:
By following these steps and using the "vue-scrollto" library, you can scroll to a specific line in your Vue Good Table with ease. |
Hi! I'm trying to do this, but I can't make it to work. probably I don't set the container correct of I don't set the element to scroll correct. So what I have to set to the container?
The settings:
Then the following code:
It seems to be correct, but the table is not scrolled. What I'm doing wrong? |
I think If any another things please reply me. |
I checked this. The variable is not undefined. However, I solved the problem without the this component and it works fine. I used element.scrollTop . Thanks for your effort to help me. |
Issue Type (delete the irrelevant ones)
Specs
What version are you using?
2.21.11
What browser?
chrome
Hi,
I'm using vue-good-table in my project, and sometimes in my app the user requests to highlight a specific row. sometimes the table is big and this row is not in the current view, so i want to automatically scroll to that specific line.
I don't use pagination, I just have a table with, let's say 100 rows.
So my first question is - is there a way to automatically scroll to a specific row?
And if not - is there a way to tell current row order (after filter and sort)
Thank you very much!!
Adi
The text was updated successfully, but these errors were encountered: