-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[examples] Nextjs Link missing passHref
#28588
Comments
passHref
Suggested Fix diff --git a/examples/nextjs-with-typescript/src/Link.tsx b/examples/nextjs-with-typescript/src/Link.tsx
index 2f54fb257e..7318f42a94 100644
--- a/examples/nextjs-with-typescript/src/Link.tsx
+++ b/examples/nextjs-with-typescript/src/Link.tsx
@@ -28,6 +28,7 @@ export const NextLinkComposed = React.forwardRef<HTMLAnchorElement, NextLinkComp
replace={replace}
scroll={scroll}
shallow={shallow}
+ passHref
locale={locale}
>
<Anchor ref={ref} {...other} />
and in the other /examples https://codesandbox.io/s/sad-mendeleev-324fk?file=/src/LinkNew.tsx |
That fixes it. |
It's a regression from #28178. I removed the Regarding the fix proposed in #28588 (comment), we also need to update the other /examples. |
Current Behavior 😯
mui recently updated nextjs-with-typescript example that changes Link component.
The new Link component wraps a tag with styled and this component lost it's native behavior.
Expected Behavior 🤔
Native link should
Steps to Reproduce 🕹
https://codesandbox.io/s/cranky-bash-2tddh?file=/pages/index.tsx
Context 🔦
Your Environment 🌎
same with the codesandbox example.
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: