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

Chakra V3's Tabs.Trigger asChild switch breaks React Dom Router #9210

Open
1 of 3 tasks
EyuelDK opened this issue Nov 19, 2024 · 0 comments
Open
1 of 3 tasks

Chakra V3's Tabs.Trigger asChild switch breaks React Dom Router #9210

EyuelDK opened this issue Nov 19, 2024 · 0 comments

Comments

@EyuelDK
Copy link

EyuelDK commented Nov 19, 2024

Description

When I use Tabs.Trigger asChild with a React Dom Router Link, it should navigate to the new page once. Instead it navigates twice to that page - the first being similar to navigate functionality of React DOM router, but then it's followed by a browser navigation as if the raw link is manually clicked without using React Dom Router.

Link to Reproduction

https://codesandbox.io/p/devbox/nmz942

Steps to reproduce

  1. Run the project via npm run dev
  2. Click tab link that says "This link does NOT work"
  3. The page will load navigate using React DOM router, then it'll navigate again via browser navigation instead of React DOM router.
    Please see console log to see "Navigated to xxx" message - hence showing the browser navigated instead of React DOM router.

Chakra UI Version

3.1.2

Browser

Google Chrome

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

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

No branches or pull requests

1 participant