bug(material/form-field): hiding a label after it has been shown leaves a blank space #29401
Labels
area: material/form-field
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When the
mat-label
tag is removed from amat-form-field
a white gap remains visible.Reproduction
StackBlitz link
Expected Behavior
If
hasLabel$
has a default value offalse
hasLabel$ = new BehaviorSubject(false);
andmat-label
is hidden from the start, it works as it should, but I would expect it to work as well if the label is removed later.Actual Behavior
The blank space remains visible.
Environment
The text was updated successfully, but these errors were encountered: