Skip to content

Is there a way to keep the scroll position when switching between Tab Panels? #10036

Discussion options

You must be logged in to vote

Panels are destroyed when switched unless you use keep-alive. If you don't use this property, then you can use onBeforeUnmount method to save the current position. Save the data outside of your component but within the <script> tags. In the onMounted method, check if the value is > 0 and set scroll offset appropriately.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by metalsadman
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants