Feature Request : Mat-Tab select by name.
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Bug, feature request, or proposal:
Feature Request for material tabs
#### What is the expected behavior?
The ability to select a tab by its name, like this;
``
``
#### What is the current behavior?
``
#### What is the use-case or motivation for changing an existing behavior?
I am using the material tabs in a responsive app. When the app is in mobile size I display 5 tabs, when the app is in desktop size I display 3 tabs. The reason is since there is more room on the desktop I combine the content and show less tabs.
The issue is when I try to link to a specific tab via a URL. I would use a query parameter like ?tabindex=2. However since my tab index changes depending on the application size, the link will work in one case and not the other. So it would be useful to link to the tab by name like this, ?tab=profile. This way I can pass the name to the component and it can figure out the active tab regardless of the index number.
コントリビューションガイド
調査の方向性
Issue で説明されている mat-tab-group と mat-tab のエントリポイントから始め、現在 selectedIndex がアクティブなタブをどのように制御しているかを確認します。タブがレスポンシブに表示または結合される場合に、名前ベースの選択 API がどのように動作すべきかを定義し、その後、?tab=profile のような URL がインデックスに依存せず意図したタブを選択することを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100