feat(mat-select): add smart panel width based on trigger and largest option size
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 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 行为。定义并实现一个 API 或 option,使 panel 至少与 trigger 一样宽,同时允许其扩展到最大 option 的宽度,然后验证对于更宽和更窄的 option 的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100