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 disable scroll animation with scrollTo() #29

Open
soichih opened this issue Feb 5, 2018 · 2 comments
Open

How to disable scroll animation with scrollTo() #29

soichih opened this issue Feb 5, 2018 · 2 comments

Comments

@soichih
Copy link

soichih commented Feb 5, 2018

Is there a way to disable scroll animation when I set scroll position with scrollTo()?

Like.. when I do .

this.$refs.Scrollbar.scrollToY(1000)

My window scroll to the position as if someone is scrolling to the location manually. Is there a way to disable it, and instead jump to the scroll location?

@soichih
Copy link
Author

soichih commented Feb 26, 2018

I've switched to use perfect-scrollbar - which works more like a native scrollbar.

npm install perfect-scrollbar --save

import 'perfect-scrollbar/css/perfect-scrollbar.css'
import PerfectScrollbar from 'perfect-scrollbar'

..

    data() {
        return {
            ps: null,
        }
    },

    mounted () {
        this.ps = new PerfectScrollbar(this.$el);
    },

    destroyed() {
        this.ps.destroy();
    },

@selven
Copy link

selven commented Mar 19, 2018

You can remove the transition from the css file.

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

2 participants