@@ -33,7 +33,7 @@ import {
3333 MAT_LABEL_GLOBAL_OPTIONS ,
3434 mixinColor ,
3535} from '@angular/material/core' ;
36- import { fromEvent } from 'rxjs' ;
36+ import { EMPTY , fromEvent , merge } from 'rxjs' ;
3737import { startWith , take } from 'rxjs/operators' ;
3838import { MatError } from './error' ;
3939import { matFormFieldAnimations } from './form-field-animations' ;
@@ -246,12 +246,10 @@ export class MatFormField extends _MatFormFieldMixinBase
246246 this . _changeDetectorRef . markForCheck ( ) ;
247247 } ) ;
248248
249- let ngControl = this . _control . ngControl ;
250- if ( ngControl && ngControl . valueChanges ) {
251- ngControl . valueChanges . subscribe ( ( ) => {
252- this . _changeDetectorRef . markForCheck ( ) ;
253- } ) ;
254- }
249+ // Run change detection if the value, prefix, or suffix changes.
250+ const valueChanges = this . _control . ngControl && this . _control . ngControl . valueChanges || EMPTY ;
251+ merge ( valueChanges , this . _prefixChildren . changes , this . _suffixChildren . changes )
252+ . subscribe ( ( ) => this . _changeDetectorRef . markForCheck ( ) ) ;
255253
256254 // Re-validate when the number of hints changes.
257255 this . _hintChildren . changes . pipe ( startWith ( null ) ) . subscribe ( ( ) => {
0 commit comments