URL with Anchor Reloads Storybook and Removes the Anchor – How Can I Prevent This? #29379
Unanswered
GuilhermeABRoncari
asked this question in
Help
Replies: 1 comment
-
I have the same issue. (1) Where in Storybook is autogenerating the anchor links for stories on a component page? (2) Not sure what code is stripping the anchor link when opening it in a new tab? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I'm using #React #NextJS
Hello! This is my first time posting here, so I hope I'm doing this right! 😄
I've built a Storybook application and created a custom full-text search system inside it, which works perfectly. However, when I create a URL with an anchor (linking to a specific subtitle in the documentation) and open that URL in a new tab or browser, Storybook always restarts. It doesn't automatically scroll to the subtitle, and it also removes the anchor from the URL.
I've noticed this behavior doesn't happen in other Storybook projects, like Fluent UI, where URLs with anchors work as expected, and the page scrolls to the correct section.
I'm not sure if there's a configuration or setup that I'm missing, but I'd really appreciate any guidance on how to prevent Storybook from restarting and make it scroll to the correct section when opening URLs with anchors in a new tab.
Thanks in advance for your help!
Additional information
Thats my main.ts:
Version 8.3.5
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions