nextui
nextui copied to clipboard
[BUG] - Select value truncation is broken when rendered in a flex container
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
- Go to https://heroui.app/krEL2xp.
- Observe the truncation behaviour.
- Select a few items.
- Observe the truncation behaviour.
Expected behavior
There should be no truncation happening when the select trigger can grow.
Screenshots or Videos
Operating System Version
macOS
Browser
Firefox
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).