Vuetify: [Bug Report] V-Select scrolling behaviour

Created on 28 Nov 2017  路  14Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 0.17.3
Vue: 2.5.9
Browsers: Chrome 62.0.3202.94
OS: Windows 7

Steps to reproduce

Give the select component a largish number of items (anything above 50 will do).

Open the select and start scrolling

Expected Behavior

The scrollbar thumb should be of constant height (representing the relationship between the overall height of the item list and the height of the popup element), and scrolling should be fluid and linear

Actual Behavior

The scrollbar's thumb starts off too high and as you begin to scroll, changes it's height and jumps to a different location on its track - basically disappearing from under the mouse cursor - thus leading to a jittery and uneven scrolling action making it almost impossible to reach the bottom of the list

Reproduction Link

https://codepen.io/anon/pen/RjYmJb?editors=1010

VAutocomplete VCombobox VSelect bug enhancement

Most helpful comment

Updating :auto="true" to :menu-props="{ auto: true }" worked for me.

All 14 comments

v-select lazy-loads items 20 at a time for performance reasons. This could be done with a set number of items at some point in the future though.

I understand the perf concern but shouldn't the UX concern take precedence here?

The current strategy makes the component practically unusable when dealing with long lists so what's the point of having nice perf in a context that no-one would ever use unless they like to hear their users complain.

Yeah, that behaviour is really annoying and not at all user friendly. Any updates on that?

It was removed in 1.1 but had to be added back because of the massive performance impact if you have a lot of records. We're planning to add proper list virtualisation at some point, but probably not in 1.1

How about changing it into a prop? In my current project for example I have a fixed amount of about 150 records, would be cool if I could set the value myself.

Great, thank you! Using auto will indeed render the whole list, guess i missed that in the documentation. Sadly this seems to break max-height (now having no effec, at least on 1.0.17), but i will use it anyway. Thanks!

:auto="true" doesn't seem to fix this for me on 2.1.6 -- and, if it did work, could kill performance when I only need to scroll to position 50 out of 300.

I think this could be solvable if we could easily change the default value of 20 for VSelect.lastItem to something else via a prop.

Could it be as simple as just adding something like this to VSelect.ts?:

props: {
  ...
  defaultLastItem: Number,
  ...
},
mount () {
  ...
  if (this.defaultLastItem > this.lastItem) this.lastItem = this.defaultLastItem
  ...
},
watch: {
  ...
  defaultLastItem (v) {
    if (v > this.lastItem) this.lastItem = v
  }
  ...
}

Is there any news on this issue? Is there a work-around?

Updating :auto="true" to :menu-props="{ auto: true }" worked for me.

Updating :auto="true" to :menu-props="{ auto: true }" worked for me.

Passing menu-props="auto" worked. Thanks

This is pending the completion of #10944. Otherwise it will be bumped.

:menu-props="{ auto: true }" dont work in version 1.5.22. In which version does it work?

:menu-props="{ auto: true }" dont work in version 1.5.22. In which version does it work?

Works on Vuetify 2.2+

Was this page helpful?
0 / 5 - 0 ratings