ionic-team / ionic-team/ionic-framework

bug: Ionic navigation query param bug

オープン
#29,961 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
triage
主要言語
TypeScript
スター
52.7k
フォーク
13.3k
平均マージ
1日 14時間
マージ済み PR(30日)
50

説明

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

https://github.com/user-attachments/assets/5f1f8f50-27dd-4d57-ac23-780aa839e03e

For some reason the parent page inherit the nested route query params if you navigate the tabs in a certain way.

### Expected Behavior

The ionic navigation should not apply query params from nested pages to the parent page.

### Steps to Reproduce

https://github.com/user-attachments/assets/5f1f8f50-27dd-4d57-ac23-780aa839e03e

I've made a basic ionic demo project with tabs and only added the nested page "foo" and a button to push the new route.

1. Clone this repo https://github.com/rishoej/ionic-navigation-query-param-bug/tree/main and `run npm i` and `npm run dev`
2. Click the button "Go to nested page"
3. The url is "/tabs/tab1/foo?foo=bar" (which is intended)
4. Click Tab1 in the navigation, so you return to the parent route "/tabs/tab1"
5. Click Tab2 in the navigation
6. Click Tab1 again and it will now somehow inherit the previous query param "/tabs/tab1?foo=bar"

### Code Reproduction URL

https://github.com/rishoej/ionic-navigation-query-param-bug/tree/main

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/trqj/homebrew/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 8.3.3

Capacitor:

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

Utility:

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

System:

NodeJS : v21.6.2 (/Users/trqj/homebrew/Cellar/node/21.6.2/bin/node)
npm : 10.2.4
OS : macOS Unknown

### Additional Information

_No response_

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

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

調査の方向性

リンクされている再現プロジェクトをクローンし、`npm i` と `npm run dev` を実行して、記載されているタブとネストされたルートの手順に従います。`/tabs/tab1/foo?foo=bar` と `/tabs/tab1` 周辺の Ionic Vue のナビゲーション動作を追跡します。親ルートに戻ったときやタブを切り替えたときに、ネストされたページのクエリパラメーターが引き継がれなくなれば完了です。

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

評価

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

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

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