angular / angular/components

bug(MatFormField): Rendering MatChips within a MatChipGrid using NgTemplateOutlet breaks the floating label.

未关闭
#28,524 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: material/chips P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Description

Rendering MatChips within a MatChipGrid using NgTemplateOutlet breaks the floating label.

### Reproduction

StackBlitz link:
https://stackblitz.com/edit/itsykq?file=src%2Fexample%2Fchips-form-control-example.ts

### Expected Behavior

I expected the rendered chip template to work as normal chip.

### Actual Behavior

What happens is that when we click away from the input field, the float label floats down, making the label obstructed by the chips added.

### Environment

- Angular: 17.1
- CDK/Material: 17.1
- Browser(s): Chrome
- Operating System: macOS

贡献指南

打开贡献指南

调研方向

首先运行链接的 StackBlitz 复现,并检查其中描述的 MatFormField、MatChipGrid 和 NgTemplateOutlet 交互。比较在输入框外点击前后浮动标签的行为;当渲染出的 chips 表现正常,且标签保持正确浮动而不被遮挡时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。