Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnderlineNav items collapses into the more menu then it is wrapped with a flex #4297

Open
broccolinisoup opened this issue Feb 23, 2024 · 0 comments
Assignees
Labels

Comments

@broccolinisoup
Copy link
Member

Description

When UnderlineNav is placed into a flex container, even though there are enough space, items are collapsed into the menu. I suspect that is happening due to the overflow behaviour. When there is any "autonomy" given to the underlinenav container using like max-content, auto etc, it simply renders the item in less space as possible i.e. collapses them under more menu.

This is problematic when UnderlineNav is used along with other elements in the same row when styling with flex. An example is reported here in Slack (Hubber only link )

Seems like this was working fine on the v35.21.0 based on the case shared above in slack🤔

Steps to reproduce

  1. Go to any stories on underlinenav storybook
  2. Wrap the Underlinenav with a flex container like below
<Box sx={{display: 'flex'}}>
    <UnderlineNav aria-label="Repository">
      {children.map((child: string, index: number) => (
        <UnderlineNav.Item key={index} icon={child.icon} href="#" aria-current={index === 0 ? 'page' : undefined}>
          {child.name}
        </UnderlineNav.Item>
      ))}
    </UnderlineNav>
</Box>
  1. Observe the items are pulled into the menu even though there is enough space

Version

v36.9.0

Browser

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant