Skip to content

Commit 9250c8d

Browse files
committed
refactor(form-field): remove unnecessary bindings
Removes the `mat-accent` and `mat-warn` host bindings from the `mat-form-field` since they're already handled by the `Color` mixin.
1 parent c8ceae5 commit 9250c8d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/material/form-field/form-field.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ export const MAT_FORM_FIELD_DEFAULT_OPTIONS =
127127
'[class.mat-form-field-disabled]': '_control.disabled',
128128
'[class.mat-form-field-autofilled]': '_control.autofilled',
129129
'[class.mat-focused]': '_control.focused',
130-
'[class.mat-accent]': 'color == "accent"',
131-
'[class.mat-warn]': 'color == "warn"',
132130
'[class.ng-untouched]': '_shouldForward("untouched")',
133131
'[class.ng-touched]': '_shouldForward("touched")',
134132
'[class.ng-pristine]': '_shouldForward("pristine")',
@@ -303,7 +301,7 @@ export class MatFormField extends _MatFormFieldMixinBase
303301
}
304302

305303
// Subscribe to changes in the child control state in order to update the form field UI.
306-
control.stateChanges.pipe(startWith(null!)).subscribe(() => {
304+
control.stateChanges.pipe(startWith(null)).subscribe(() => {
307305
this._validatePlaceholders();
308306
this._syncDescribedByIds();
309307
this._changeDetectorRef.markForCheck();

0 commit comments

Comments
 (0)