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

How to set a scroll position to bottom? #16

Open
a1tem opened this issue May 25, 2018 · 3 comments
Open

How to set a scroll position to bottom? #16

a1tem opened this issue May 25, 2018 · 3 comments

Comments

@a1tem
Copy link

a1tem commented May 25, 2018

So I have a long list of items when I refresh a page I need to do something like that this.$refs.scroll.setToBottom(); How can I achieve that?

@seyfer
Copy link

seyfer commented Aug 10, 2018

+1. needed feature.

@a1tem
Copy link
Author

a1tem commented Aug 11, 2018

@seyfer Hi, I made this work like this:
scrollToEnd() {
setTimeout(() => {
const container = this.$el.querySelector('.ps-container');
container.scrollTop = container.scrollHeight;
}, 0);
}

So whenever I need to scroll down I call this.scrollToEnd()

@victorLessa
Copy link

This function doesn’t scroll down all the way, a small part is missing

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