ionic-team / ionic-team/ionic-framework

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

Ouverte
#30,230 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
triage
Langage dominant
TypeScript
Étoiles
52.7k
Forks
13.3k
Merge moyen
1 j 15 h
PR mergées (30 j)
51

Description

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### 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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.