[FormField] Add option to allow hint to be shown only when focused
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
#### Bug, feature request, or proposal:
Feature request
#### What is the expected behavior?
When the option is specified, the hint/helper text is hidden unless the field has focus.
#### What is the current behavior?
The hint is always displayed unless no hint is used
#### What is the use-case or motivation for changing an existing behavior?
Material Design specifications call for the hint to be either always displayed or displayed on focus only: https://material.io/guidelines/components/text-fields.html#text-fields-layout (see 'Helper text').
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material v5
贡献指南
调研方向
从 Angular Material FormField 实现入手,跟踪当前提示/辅助文本的渲染方式。确认该选项预期的聚焦和未聚焦状态,然后验证提示在未获得焦点时被隐藏,并在获得焦点时保持可见。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100