UNavigationMenu dropdown width issue inside UHeader
Open
Nobody has claimed this yet.
triage
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Package
v4.x
Description
Hi there, I'm not sure if this is a bug or intended behavior, so I'm posting here..
When placing a UNavigationMenu with children inside the UHeader's default slot, the dropdown width becomes too narrow and truncates the child labels.
Is there a any recommended way to fix this?
const items = computed<NavigationMenuItem[]>(() => [
{
label: 'Home',
to: '/',
active: route.path === '/',
},
{
label: 'Assets',
to: '/assets/dashboard',
active: route.path.startsWith('/assets'),
children: [
{
label: 'Dashboard',
description: '',
to: '/assets/dashboard',
active: route.path === '/assets/dashboard'
},
{
label: 'Request',
to: '/assets/request',
active: route.path === '/assets/request'
},
],
},
])
<template>
<UHeader>
<UNavigationMenu :items="items" />
</UHeader>
</template>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided UHeader and UNavigationMenu example with the nested items. Compare the dropdown width and child-label rendering when UNavigationMenu is placed in UHeader's default slot. Done means the child labels no longer truncate, or the recommended configuration is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tailwindcss, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100