Hey, does that library have any ability to disable pointerScroll feature?
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.
Most helpful comment
There's no prop, but you can extend the component and set
maybeAdjustScrollto return false.Now you have a custom select you can use in your template:
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.