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

TabsNext doesn't adhere to max width and overflows #4724

Open
4 of 11 tasks
origami-z opened this issue Feb 18, 2025 · 0 comments · May be fixed by #4741
Open
4 of 11 tasks

TabsNext doesn't adhere to max width and overflows #4724

origami-z opened this issue Feb 18, 2025 · 0 comments · May be fixed by #4741
Labels
community For issues that have been raised by folks outside the core Salt team component: tabs package: lab Lab package status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged.

Comments

@origami-z
Copy link
Contributor

origami-z commented Feb 18, 2025

Latest version

  • I have tested the latest version

Description

TabsNext exceeds available space, especially after selecting an item from the overflow menu. It also appears that at least 2 tabs will be visible when selecting from the overflow menu, works fine when selecting between visible tabs.

Split from #4617

Community report from SO#97197 SO#97131

Steps to reproduce

https://stackblitz.com/edit/vitejs-vite-nmkvothf?file=src%2FApp.tsx

      <div style={{ maxWidth: 200, background: 'yellow' }}>
        <TabsNext defaultValue={tabs[0]}>
          <TabBar inset divider>
            <TabListNext style={{ margin: 'auto' }}>
              {tabs.map((label) => (
                <TabNext value={label} key={label}>
                  <TabNextTrigger>{label}</TabNextTrigger>
                </TabNext>
              ))}
            </TabListNext>
          </TabBar>
        </TabsNext>
      </div>

Expected behavior

Tabs shouldn't exceed given space, when selecting from overflow menu

Package name(s)

Lab (@salt-ds/lab)

Package version(s)

@salt-ds/[email protected]

Browser

  • Chrome
  • Safari
  • Firefox
  • Microsoft Edge

Operating system

  • macOS
  • Windows
  • Linux
  • iOS
  • Android

Are you a JPMorgan Chase & Co. employee?

  • I am an employee of JPMorgan Chase & Co.
@origami-z origami-z added community For issues that have been raised by folks outside the core Salt team component: tabs package: lab Lab package status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged. labels Feb 18, 2025
@joshwooding joshwooding marked this as a duplicate of #4755 Feb 25, 2025
@github-actions github-actions bot linked a pull request Feb 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community For issues that have been raised by folks outside the core Salt team component: tabs package: lab Lab package status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged.
Projects
Development

Successfully merging a pull request may close this issue.

1 participant