ionic-team / ionic-team/ionic-framework

bug: ion-tab-button not selected when using routeParams

オープン
#18,726 コメント 10 件 リアクション 1 件 担当者 0 名 GitHub で見る
package: angular type: bug
主要言語
TypeScript
スター
52.7k
フォーク
13.3k
平均マージ
1日 15時間
マージ済み PR(30日)
51

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend, mobile-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。