Skip to content

Commit a6d4141

Browse files
authored
fix(material/form-field): update outline gap when prefix changes (#23869)
The position of the outline gap depends on the size of the prefix, but we weren't set up to update it when that happens. Fixes #23863.
1 parent 72d2e5a commit a6d4141

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/material/form-field/form-field.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
</div>
1717
</ng-container>
1818

19-
<div class="mat-form-field-prefix" *ngIf="_prefixChildren.length">
19+
<div
20+
class="mat-form-field-prefix"
21+
*ngIf="_prefixChildren.length"
22+
(cdkObserveContent)="updateOutlineGap()"
23+
[cdkObserveContentDisabled]="appearance != 'outline'">
2024
<ng-content select="[matPrefix]"></ng-content>
2125
</div>
2226

0 commit comments

Comments
 (0)