Repository navigation
fix(VCommandPalette): pass keyboard and click wiring to custom slots - #23260
Open
MatthewAry wants to merge 2 commits into
Open
MatthewAry wants to merge 2 commits into
MatthewAry wants to merge 2 commits into
Conversation
The `input` slot now receives `props` with the combobox attributes and keyboard handler, and the `item` slot receives `props` whose click runs the command. fixes #23259 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MatthewAry
marked this pull request as ready for review
October 9, 2026 22:07
- item slot `props` only carries list item props, `item` is the original item - focus a custom input when the palette opens - document `v-model:search` for custom inputs, add input and item slot examples Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
fixes #23259
Depends on #23258 and is based on its branch, so only the slot changes show here.
A custom input from the
inputslot had no keyboard navigation: the keydown handler (and now the combobox attributes) were only attached to the built-in VTextField. Clicking an item rendered through theitemslot didn't run the command either.Both slots now pass
propsto bind, like VSelect'sitemslot and VOverlay'sactivatorslot:input:{ props }withrole,aria-expanded,aria-controls,aria-autocomplete,aria-activedescendantandonKeydown. The built-in VTextField spreads the same object. A custom input is also focused when the palette opens.item:{ item, index, props }.propsholds the same list item fields the default rendering uses (value,title,subtitle, icons, avatars) plusindexand anonClickthat runs the command, so other item fields likehotkeydon't leak onto the DOM.onClickreplaces the item's own handler instead of merging with it, because running the command already callsitem.onClick(event, value).propsdoesn't carry the search model: a VTextField needsmodelValue, a native input needsvalue/onInput, and the built-in field already has its ownv-model. The docs and slot descriptions say to connect a custom input tov-model:searchinstead.Behavior change:
itemin theitem,item.prepend,item.titleanditem.appendslots is now the original item, matching the declared slot type. Before, it was the internal list props, wherevaluewas the filtered index.Adds
slot-inputandslot-itemdocs examples.Markup:
🤖 Generated with Claude Code