angular / angular/components

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

Open
#28,524 2 comments 0 reactions 0 assignees View on GitHub
area: material/chips P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start by running the linked StackBlitz reproduction and inspecting the MatFormField, MatChipGrid, and NgTemplateOutlet interaction described there. Compare the floating label behavior before and after clicking away from the input; done means the rendered chips behave normally and the label remains correctly floated without being obstructed.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.