Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Hi,
When using the mat-chip
with a button that has the matChipRemove
directive combined with the *ngIf
structural directive, as the condition changes from true / false, the mat-chip
does not seem to correctly handle the state change in it's css styling.
Reproduction
Steps to reproduce:
-
add a mat-chip in your template
-
add a button with an
matChipRemove
directive and an*ngIf
directive that resolves a condition
-
change the condition value so the button is removed/added to the DOM
Notice that the padding of the chips does not reflect the state.
Demo: https://stackblitz.com/edit/angular-6ngj4w?file=src%2Fapp%2Fchips-overview-example.html
Expected Behavior
Should apply correct styling (ex: padding)
Actual Behavior
The text and size of the padding are broken after a structural change
Environment
- Angular: 15.2.0
- CDK/Material: 15.2.0
- Browser(s): Chrome latest
- Operating System (e.g. Windows, macOS, Ubuntu): Windows