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

fix(VAutocomplete): reset selection index to -1 after deletion #20836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TIM56887
Copy link
Contributor

@TIM56887 TIM56887 commented Jan 5, 2025

Description

fixes #20796
Reset selectionIndex to -1 after using Backspace or Delete

Markup:

<template>
  <v-autocomplete
    :items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
    label="Autocomplete"
    multiple
  />
</template>

select(model.value[selectionIndex.value], false)

selectionIndex.value = originalSelectionIndex >= length - 1 ? (length - 2) : originalSelectionIndex
selectionIndex.value = -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will I be unable to perform continuous deletions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @babu-ch,

Yes, after this change, it will be unable to perform continuous deletions directly with a single backspace press. But can still delete by pressing backspace twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants