Vue-select: Disable pointerScroll feature

Created on 4 Feb 2018  路  8Comments  路  Source: sagalbot/vue-select

Hey, does that library have any ability to disable pointerScroll feature?

released

Most helpful comment

There's no prop, but you can extend the component and set maybeAdjustScroll to return false.

import vSelect from 'vue-select'

Vue.component('v-select', vSelect)

Vue.component('custom-select', {
  extends: vSelect,
  methods: {
    maybeAdjustScroll: () => false
  }
})

Now you have a custom select you can use in your template:

<custom-select></custom-select>

This will overwrite the default implementation and prevent the list from scrolling when keying down the list. Out of curiosity what's the use case? Maybe this should be a prop.

All 8 comments

There's no prop, but you can extend the component and set maybeAdjustScroll to return false.

import vSelect from 'vue-select'

Vue.component('v-select', vSelect)

Vue.component('custom-select', {
  extends: vSelect,
  methods: {
    maybeAdjustScroll: () => false
  }
})

Now you have a custom select you can use in your template:

<custom-select></custom-select>

This will overwrite the default implementation and prevent the list from scrolling when keying down the list. Out of curiosity what's the use case? Maybe this should be a prop.

@sagalbot my list has over 1000 items in it, and the pointerScroll feature behaves erratically whenever the mouse is moved. Extending the component as shown in your example above disables pointerScroll and improves the behaviour. Thanks.

+1 for making maybeAdjustScroll a prop

+1 - Yes please, I spent a good half a day trying to find out how to disable this until I came across this post.

+1 for making maybeAdjustScroll a prop

Another +1 馃檹

:tada: This issue has been resolved in version 3.10.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

The people have spoken! The auto scroll code has been refactored from scratch, and can be disabled by setting autoscroll to false.

https://vue-select.org/api/props.html#autoscroll

Was this page helpful?
0 / 5 - 0 ratings

Related issues

threeaccents picture threeaccents  路  3Comments

jluterek picture jluterek  路  3Comments

FrancescoMussi picture FrancescoMussi  路  3Comments

rafalolszewski94 picture rafalolszewski94  路  3Comments

pud1m picture pud1m  路  3Comments