Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

Back/Forward not working in Semantic Tab with Router

Open weignerg opened this issue 6 years ago • 5 comments

There was a previous question asked and an answer provided regarding setting up Routing and Tabs.

The code that was provided had an issue with back/forward navigation

I am wondering if someone else might be able to help understand why the router is not working when back/forward buttons are pressed.

Here is the previous issue/question. https://github.com/Semantic-Org/Semantic-UI-React/issues/3719

Here is the sample code that has the issue with navigation: https://codesandbox.io/s/react-example-qxb2k

Any help understanding is greatly appreciated.

Thank you,

weignerg avatar Apr 16 '20 16:04 weignerg

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Apr 16 '20 16:04 welcome[bot]

Does it have something to do with the default active index that is selected from available menuItems? It appears that when this changes, the menuItem information is changing, but the render is not actually rendered...?

weignerg avatar Apr 16 '20 17:04 weignerg

I figured out a way to make it work.

Check it out!

https://codesandbox.io/s/react-example-5jtuo?file=/index.js

weignerg avatar Apr 24 '20 00:04 weignerg

Unless you can or want to manage the activeIndex for the tabs, set it to -1, or multiple tabs in the menu will stay active when navigating backward and forward.

weignerg avatar Apr 24 '20 16:04 weignerg

Any way to achive this using nextjs?

petrosrodinos avatar May 04 '22 11:05 petrosrodinos