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

[Bug Report][2.6.1] v-select with prepended/appended items highlights incorrect item #14489

Closed
oohira opened this issue Dec 10, 2021 · 7 comments · May be fixed by #14972
Closed

[Bug Report][2.6.1] v-select with prepended/appended items highlights incorrect item #14489

oohira opened this issue Dec 10, 2021 · 7 comments · May be fixed by #14972
Labels
C: VSelect VSelect S: has PR The issue has a pending Pull Request T: bug Functionality that does not work as intended/expected

Comments

@oohira
Copy link

oohira commented Dec 10, 2021

Environment

Vuetify Version: 2.6.1
Vue Version: 2.6.14
Browsers: Chrome 95.0.4638.69
OS: Mac OS 10.15.7

Steps to reproduce

  1. Open v-select menu items
  2. Click 4th item
  3. 2nd item is highlighted

Expected Behavior

4th item is highlighted

Actual Behavior

2nd item is highlighted

Reproduction Link

https://codepen.io/oohira/pen/poWEoqw

Other comments

Reproduction Link is same as the sample of Vuetify official document.

@adil-portable

This comment has been minimized.

@adil-portable

This comment has been minimized.

@adil-portable

This comment has been minimized.

@arteymix
Copy link

Still present in 2.7.0. Is there a known workaround for this issue?

@jimmylee850328

This comment was marked as off-topic.

@Dmitrii-Iakovenko
Copy link

hack:

<v-select
      ...
      ref="mySelect"
      @change="onSelectChange"
>

method:

    onSelectChange() {
      setTimeout(() => {
          const index = this.$refs.mySelect.$refs.menu.listIndex;
          this.$refs.mySelect.$refs.menu.listIndex = index + 2;
      }, 10);
    },

@truesteps
Copy link

@Dmitrii-Iakovenko thanks for the workaround, this seems to fix the highlight issue, but the scroll into view bug still persists. I opened a new issue for this here: #19026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VSelect VSelect S: has PR The issue has a pending Pull Request T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants