nuxt / nuxt/ui

min-w-fit not working with virtualization in USelectMenu

Open
#5,534 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment
  • Operating System: Linux
  • Node Version: v22.16.0
  • Nuxt Version: 4.2.1
  • CLI Version: 3.30.0
  • Nitro Version: 2.12.9
  • Package Manager: npm@10.9.2
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -
Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.1.0

Reproduction

https://stackblitz.com/edit/uselectmenu-error

Description

When using the USelectMenu component with the virtualize option enabled, the min-w-fit class applied via the ui.content property does not behave correctly. The dropdown content does not resize to fit the longest item.
Without virtualization, the same configuration works as expected, the dropdown expands to show the full content width.

Additional context

Expected behavior:

Image

Unexpected behavior:

Image
Logs

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 with the linked StackBlitz reproduction and inspect the USelectMenu behavior with virtualize enabled versus disabled. Trace how the ui.content min-w-fit class is applied to the virtualized dropdown; done means the content resizes to fit the longest item as it does without virtualization.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, tailwindcss, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.