DominikSerafin / vuebar

(🗃️ Archived) Vue 2 directive for custom scrollbar that uses native scroll behavior. Lightweight, performant, customizable and without dependencies. Used successfully in production on https://ggather.com
https://github.serafin.io/vuebar/
MIT License
649 stars 77 forks source link

How to scroll to bottom? #58

Closed shahidkarimi closed 5 years ago

shahidkarimi commented 6 years ago

How to scroll to bottom?

m6t9 commented 6 years ago

How to scroll to bottom?

DominikSerafin commented 5 years ago

Hey @shahidkarimi @m6t9, Vuebar doesn't interfere with native scroll events. So you can just use native JS DOM scrolling events & methods.

In case of Vuebar - the inner wrapper element is a 'scrollable' element (child of element with v-bar directive), so you can ref it and then e.g. use scrollTop to scroll to bottom: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop

You can also check this SO answer: https://stackoverflow.com/a/33193668/3143704