ionic-team / ionic-team/ionic-framework
bug: ion-tab-button not selected when using routeParams
- Langage dominant
- TypeScript
- Étoiles
- 52.7k
- Forks
- 13.3k
- Merge moyen
- 1 j 15 h
- PR mergées (30 j)
- 51
Description
# Bug Report
**Ionic version:**
[x] 4.6.0
(ionic/angular)
**Current behavior:**
When using a param in [tab] of an ion-tab-button, the ion-tab-button is not recognized as selected when navigating to the tab.
Example:
``
When clicking this button, 'patient/0' route is called and the tab patient/0 is shown. But the ion-tab-button is not recognized as selected.
**Expected behavior:**
I would expect that the ion-tab-button is recognized as selected.
**Other information:**
I was able to find that an stackId is used internally to decide if an ion-tab-button is selected. stackId is looking to the url and only taking the part 'patient' and ignores '/0'.
**Ionic info:**
```
Ionic:
Ionic CLI : 5.0.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 5.2.1, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 9 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start by reproducing the issue with an ion-tab-button whose tab is `patient/0`, then inspect the selection logic that derives stackId from the URL. Verify the behavior when navigating to the parameterized route, and consider the issue done when the button is recognized as selected without breaking other tab routes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend, mobile-dev
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100