-
Notifications
You must be signed in to change notification settings - Fork 62
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
Tabs and Subpages #86
Comments
Hi there - I see indeed the class tab-hidden is added to the innertab. There is something in Tab.tsx that does that based on which tab is made active. And looking into Tab.tsx I see the activation is done by selecting the tab. You can see this behaviour by invoking the blank page per your route change and then click the tab that should be shown. So (in theory - I haven't tried this) - the button that says "go back" should bring the browser back to the /tab/test1 route and trigger the select method on the tabs, so ensure the tab is selected and shown again Hope this helps |
Here's my workaround.
|
Thanks @Tommertom for pointing me into the right direction. I had a look into the IonTabs implementation and noticed that the goto (Line 32) was always pointing to the tab itself and not to the given path. Therefore navigating to subroutes of a tab was indeed not possible. I made my own implementation and changed it to navigate to the given path and selecting the related tab aftwerwards. Here is my Code:
I dont observed any side-effects by now and navigating throug the history also seem to work fine. Thank you both. :) |
@RingoRohe - thx for the code contribution. I added it in IonTabs.svelte And meanwhile I am also looking to rebuild ionic-svelte in order to resolve some of the issues with overlays and navigation. This also means possible ditching IonTabs.svelte - see #91 What are you thoughts on this? Happy hearing your views on a rebuild- #93 Same @burggraf ! Is your code snippet for Tabs or more for Nav? I rather rely on the router for IonTabs. Thx |
I was wondering whether there could be a release on NPM with this fix in it? |
Released newest version with the pending PR and I believe also this change @MotionlessTrain |
I'm trying to achieve a navigation stack with tabs and subpages but it seems like this is not possible at the current state. I took the tabs-demo and extended it with a subpage which is shown correctly but when navigating back the tab content stays blank because the ion-tab HTML element has still the tab-hidden class attached.
Demo here
So I decided to update ionic-svelte to the latest version but that made it even worse. With 0.5.82 I can't even navigate to a subpage. A button wich links to a subpage simply does nothing.
Is it me doing something wrong or is this simply not possible atm?
The text was updated successfully, but these errors were encountered: