angular / angular/components

feat(mat-select): add smart panel width based on trigger and largest option size

オープン
#29,569 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る
area: material/select feature P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Feature Description

Currently `panelWidth` can be one of three:
1. Trigger width
2. Largest option width
3. Custom provided width in numbers

What I am missing is - minimum width as trigger width and grow until max option size (if needed)

### Use Case

When having dynamic options texts sometimes they might be larger than trigger width and I want the largest option behavior.
Sometimes they are smaller than trigger width and I want the trigger width behavior to avoid really small select panels.
Which means I actually need: min panel width = trigger width with potential grow (not shrink!) to the largest option width.

Can be with a new `panelWidth` option or even `minPanelWidth` input (can have a complimenting `maxPanelWidth` too for completeness)

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

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

調査の方向性

まず、mat-select の既存の panelWidth の処理と、issue で説明されている trigger-width および largest-option の動作を読みます。パネルを trigger 以上の幅に保ちつつ、最大の option まで拡張できる API または option を定義して実装し、その後、より幅の広い option とより幅の狭い option の両方で動作を確認します。

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

評価

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

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

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