question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] items scrolling out of view in v-virtual-scroll are automatically deselected in v-list-item-group

See original GitHub issue

Environment

Vuetify Version: 2.3.9 Vue Version: 2.6.12 Browsers: Chrome 84.0.4147.105 OS: Linux x86_64

Steps to reproduce

Place a v-virtual-scroll inside a v-list-item-group and set all items as selected. Scroll down the list and keep an eye on the selected (or v-list-item-group’s v-model) field in data. You will see that all items scrolling out of view are automatically deselected, which may be undesirable if these items should remain selected.

Expected Behavior

Items that are selected should remain selected, even if they scroll out of view

Actual Behavior

Items that scroll out of view are automatically deselected.

Reproduction Link

https://codepen.io/dschreij/pen/eYZByWz?editors=1010

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dschreijcommented, Oct 8, 2020

You are right! I’m pretty amazed actually 😃

The question remains however if this is intended behavior. Normally you would wrap a v-list-item-group around multiple list elements e.g.:

<v-list-item-group>
  <v-list>
     <v-list-item>...</v-list-item>
     <v-list-item>...</v-list-item>
     <v-list-item>...</v-list-item>
     ...
  </v-list>
</v-list-item-group>

what this solution effectively does is:

<v-list>
   <v-list-item-group>
       <v-list-item>...</v-list-item>
   </v-list-item-group>
   <v-list-item-group>
       <v-list-item>...</v-list-item>
   </v-list-item-group>
   <v-list-item-group>
       <v-list-item>...</v-list-item>
   </v-list-item-group>
</v-list>

I’ll leave it the vuetify maintainers if this is valid workaround or an unintended side effect 😃

Regardless, thanks for taking the time to place your solution here @KhanhHH

1reaction
KhanhHHcommented, Oct 8, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

ScrollViewProxy scrollTo will cras… | Apple Developer Forums
ScrollViewProxy scrollTo will crash when scrolling outside of bounds of previous (not current) List data source/array in iPad and iOS 16 beta.
Read more >
Solved: Bug? Odd behavior with automatically moving view
when you click on one of the categories that is further down in the list the page reload so the top of the...
Read more >
Scrolling prevents selection of list items in UI for ASP.NET AJAX
I have a radwindow, inside of which is a div with overflow-y:scroll. Inside the div is a radlistbox. The idea is to allow...
Read more >
Hover Scrolling in InDesign CC: It's a Feature Not a Bug
Hi Kelly, I agree completely with you! Just to clarify my view on “standard behaviour” above: From my point of view Adobe (CC)...
Read more >
Choppy scrolling in overflow:auto modal dialog when Chrome ...
Steps to reproduce the problem: 1. Create a modal dialog with position absolute in the center of the screen, and put a lot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found