ionic-team / ionic-team/ionic-framework

bug: Consecutive Pages with Swipe-able Segments causes the pages after the first to bug out

Aperta
#30,413 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
52.7k
Fork
13.3k
Merge medio
1g 15h
PR unite (30g)
51

Descrizione

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

v7.x

### Current Behavior

I am on Page One and have a Swipeable Segment setup. I can swipe or tap between the segments and my segment content correctly reflects my selection.
Once I navigate to Page Two which also has Swipeable Segment, I can tab between the values but my segment content does not update to show the correct one.

### Expected Behavior

All consecutive pages should be able to support their own implementation of swipe-able segments.

### Steps to Reproduce

1. Create a page with Swipeable Segments and some content to distinguish between the segments
2. Create another page with similar setup but change the segment names and content values so it appears distinct from first page. (_Edit: Keep the contentIds the same for both page's segment button and segment content_)
4. Navigate from the first page to second and observe how the the second page's segment does not work correctly. If you refresh and stay on the page, the segments do work because Page One is no longer in the stack.
### Code Reproduction URL

https://stackblitz.com/edit/s2qn88ad?file=src%2Fapp%2FexampleTwo.component.ts,src%2Fapp%2FexampleTwo.component.html,src%2Fapp%2Fapp.routes.ts,src%2Fapp%2Fexample.component.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fexample.component.html

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/anjildhamala/.nvm/versions/node/v22.11.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.5.7
@angular-devkit/build-angular : 19.2.12
@angular-devkit/schematics : 19.2.12
@angular/cli : 19.2.12
@ionic/angular-toolkit : 12.2.0

Capacitor:

Capacitor CLI : 7.2.0
@capacitor/android : 7.2.0
@capacitor/core : 7.2.0
@capacitor/ios : 7.2.0

Utility:

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

System:

NodeJS : v22.11.0 (/Users/anjildhamala/.nvm/versions/node/v22.11.0/bin/node)
npm : 10.9.0
OS : macOS Unknown

### Additional Information

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.