vuetifyjs / vuetifyjs/vuetify

[Bug Report][3.12.4] `VAutocomplete` emits update:search with empty string on blur, breaking remote-data selections

Open
#22,767 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C: VAutocomplete working as intended
Dominant language
TypeScript
Stars
41k
Forks
7.1k
Avg merge
1d 21h
Merged PRs (30d)
11

Description

Environment

Vuetify Version: 3.12.4
Vue Version: 3.5.31
OS: macOS 10.15 (current)

Steps to reproduce
  1. Bind v-model:search on a VAutocomplete and use it to fetch items from a remote API
  2. Search for an item not in the initial list, select it
  3. Click outside the field to trigger the blur
  4. @update:search fires with "" / undefined → remote reload → selected item disappears from items → label no longer renderable
Expected Behavior

Blurring the field should not emit @update:search.

Actual Behavior

@update:search is triggered, which updates / clears the items list, with the selected element among it. The field will then display the object's value (for example, an ID) instead of label

Reproduction Link

https://play.vuetifyjs.com/#...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the VAutocomplete component's search and blur handling, using the linked reproduction to observe the emitted value and the resulting remote-item reload. Done means blurring after selecting a remote item no longer emits the unexpected empty search update, and the selected item's label remains renderable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.