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

bug: ion-split-pane not visible when navigating from normal page - React #30230

Open
3 tasks done
TermoZour opened this issue Mar 5, 2025 · 3 comments
Open
3 tasks done
Labels

Comments

@TermoZour
Copy link

TermoZour commented Mar 5, 2025

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Page 1 has split pane. Page 2 has regular menu. Both pages share the same menu component. When navigating from Page 1 to Page 2, the collapsible Menu is not visible and the IonMenuButton is not visible. Forcing it visible does not make the Menu work. When going back to Page 1, the Split Pane is NOT visible. Refreshing on Page 1 makes the Split Pane layout appear again.

Expected Behavior

When navigating back to Page 1 from Page 2, the Split Pane layout should be visible as if the full pages are completely re-rendered.

Steps to Reproduce

Make a basic React Ionic SPA with IonRouterOutlet. Example is in the stackblitz. Observer Page 1 has Split Pane, Navigate to Page 2, go back to Page 1. Observe Split Pane is missing. Refresh page. Observe Split Pane is visible again.

Code Reproduction URL

https://stackblitz.com/edit/ionic-splitpane-layout-menu-combo?file=src%2Fpages%2FPage1.tsx

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.2.5

Capacitor:

Capacitor CLI : 6.0.0
@capacitor/android : 6.0.0
@capacitor/core : 6.0.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.18.3 (/usr/bin/node)
npm : 10.8.2
OS : Linux 6.9

Additional Information

I'm trying to update an app to show the Menu component on all pages (so the Split Pane Layout) except for one page which I want to have the Menu toggleable like on mobile UI because I have another Menu-like component which I want to show on the same side. I tried to make the Split Pane layout global for the app and just switch between apps but had a hard time hiding the split pane on the page I want it hidden, so I reverted to having the Menu (and Split Pane) on each page of my app, but now I'm getting this issue with the Pane not behaving as expected.

@ionitron-bot ionitron-bot bot added the triage label Mar 5, 2025
@TermoZour TermoZour changed the title bug: ion-split-pane bug: ion-split-pane not visible when navigating from normal page - React Mar 5, 2025
@yash170603
Copy link

@TermoZour , it seems split pane on going back to page 1 is visible on the following link->[https://stackblitz.com/edit/ionic-splitpane-layout-menu-combo?file=src%2Fpages%2FPage1.tsx]

Are you facing this issue ?

@TermoZour
Copy link
Author

It seems that now when I navigate back in stackblitz, there is a full page refresh. Like mentioned in the issue, a full page refresh fixes the Split Pane.

@TermoZour
Copy link
Author

I have replicated the same code on a repo locally, and it seems that when navigating from page 2 to page 1, the Split Pane appears coorectly on page 1, but when navigating to page 2, I can't open the Menu unless I full refresh the website while being on page 2. I have attached a video of the issue as it appears on my screen.

2025-03-07.22-54-30.mp4

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

No branches or pull requests

2 participants