Skip to content

fix(playgrounds): add the InputMenu autocomplete-mode row both are missing - #520

Merged
IgorShevchik merged 2 commits into
mainfrom
fix/input-menu-playground-mode
Aug 31, 2026
Merged

fix(playgrounds): add the InputMenu autocomplete-mode row both are missing#520
IgorShevchik merged 2 commits into
mainfrom
fix/input-menu-playground-mode

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Closes the one finding #518 recorded but did not fix.

What was missing

Upstream's 2799fa6f — the commit that renamed InputMenu's autocomplete boolean to mode: 'combobox' | 'autocomplete' — added a row exercising the new mode to its own playground:

<UInputMenu placeholder="Autocomplete" mode="autocomplete" :items="items" v-bind="props" />

The port (#68, 081a9799) dropped that line, and nothing has added one since. So mode="autocomplete" has never been reachable by hand in either playground.

Nothing else covers it, either. The unit tests exercise the prop, but no snapshot pins the mode — the render is byte-identical and only the prop spelling changes, which is exactly why 081a9799 could say "snapshots unchanged" and be right. A person looking at the component was the only way to see the mode behave, and that path did not exist.

The change

One row in each of playgrounds/nuxt and playgrounds/demo, placed identically (before the virtualized row) so the two pages stay aligned:

<B24InputMenu
  v-model="valueAutocomplete"
  :items="items"
  mode="autocomplete"
  name="some_value"
  placeholder="Autocomplete"
  aria-label="Autocomplete"
  v-bind="{ ...singleAttrs, ...props }"
  class="w-full"
/>

It takes its own ref rather than reusing one of the refs above it, and that is the substance of the change rather than boilerplate: in autocomplete mode modelValue is the input text — a string — where every other row on the page binds a selected item. Binding it to valueMultiple or valueForAdd would have typechecked in some shapes and shown the wrong thing in all of them. The comment on the declaration says so, since the reason is not visible from the row itself.

Deliberately not added: :content="{ hideWhenEmpty: true }", which the docs example carries. The playground's job is to show default behaviour; hiding the empty panel is a separate prop with its own row elsewhere.

Bookkeeping

.sync/log/2799fa6f….md — written in #518 — said "neither playgrounds/nuxt nor playgrounds/demo has an autocomplete-mode row". That is now false, so the log is updated to record that the gap was closed here rather than left standing as a stale claim.

Verification

Full gate: lint · typecheck · build (3.86 MB) · test322 files, 7502 passed, 6 skipped.

typecheck is the one that carries weight here: it runs nuxt typecheck over four projects, two of them these playgrounds, so a wrongly-typed v-model on the new row fails the gate rather than the eye.


Generated by Claude Code

claude added 2 commits August 31, 2026 06:12
…ssing

Upstream's `2799fa6f` — the commit that renamed InputMenu's `autocomplete`
boolean to `mode: 'combobox' | 'autocomplete'` — added a row exercising the new
mode to its own playground. The port (#68) dropped that line, and nothing has
added one since, so the mode has never been reachable by hand in either
playground: no snapshot covers it either, since the render is identical and only
the prop spelling differs.

The row needs its own ref rather than reusing one above it. In autocomplete mode
`modelValue` is the input text, a string, where every other row on the page
holds a selected item — which is the whole point of the mode and the thing a
person is there to look at.

Found by backfilling that commit's `.sync/log/` entry in #518, which is also
where the omission is recorded; the log's "neither playground has one" is
updated to say it was closed here.

Gate: lint, typecheck (both playgrounds among the four projects it types),
build (3.86 MB), test (322 files, 7502 passed).
The backfilled log's cross-reference was written before the PR existed and
guessed #519; it is #520. A log that points at the wrong PR is the dead
reference the pairing guard exists to prevent, one level up.
@IgorShevchik
IgorShevchik merged commit b8b7156 into main Aug 31, 2026
2 checks passed
@IgorShevchik
IgorShevchik deleted the fix/input-menu-playground-mode branch August 31, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants