nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Select value truncation is broken when rendered in a flex container

Open dklymenk opened this issue 2 months ago • 2 comments

HeroUI Version

2.8.5

Describe the bug

When Select is allowed to take as much space as needs, the truncation still occurs.

Your Example Website or App

https://heroui.app/krEL2xp

Steps to Reproduce the Bug or Issue

  1. Go to https://heroui.app/krEL2xp.
  2. Observe the truncation behaviour.
  3. Select a few items.
  4. Observe the truncation behaviour.

Expected behavior

There should be no truncation happening when the select trigger can grow.

Screenshots or Videos

Image Image

Operating System Version

macOS

Browser

Firefox

dklymenk avatar Oct 27 '25 19:10 dklymenk

ENG-2861

linear[bot] avatar Oct 27 '25 19:10 linear[bot]

I believe the issue occurs because of w-[calc(100%_-theme(spacing.6))] class on inner wrapper. It is supposed to make it so the absolutely positioned chevron does not get rendered on top the value, but also means that the contents will almost always be truncated.

In my project, as a workround, I'm adding w-full pr-6 to inner wrapper and gap-0 to trigger (I have disabled animations so there is an :after on the trigger and the default gap-3 adds unnecessary spacing).

dklymenk avatar Oct 27 '25 20:10 dklymenk