7
7
*/
8
8
9
9
import { addAriaReferencedId , removeAriaReferencedId } from '@angular/cdk/a11y' ;
10
+ import { Directionality } from '@angular/cdk/bidi' ;
11
+ import { DOWN_ARROW , ENTER , ESCAPE , TAB , UP_ARROW , hasModifierKey } from '@angular/cdk/keycodes' ;
12
+ import {
13
+ ConnectedPosition ,
14
+ FlexibleConnectedPositionStrategy ,
15
+ Overlay ,
16
+ OverlayConfig ,
17
+ OverlayRef ,
18
+ PositionStrategy ,
19
+ ScrollStrategy ,
20
+ } from '@angular/cdk/overlay' ;
21
+ import { _getEventTarget } from '@angular/cdk/platform' ;
22
+ import { TemplatePortal } from '@angular/cdk/portal' ;
23
+ import { ViewportRuler } from '@angular/cdk/scrolling' ;
24
+ import { DOCUMENT } from '@angular/common' ;
10
25
import {
11
- afterNextRender ,
12
26
AfterViewInit ,
13
- booleanAttribute ,
14
27
ChangeDetectorRef ,
15
28
Directive ,
16
29
ElementRef ,
17
- forwardRef ,
18
30
Host ,
19
- inject ,
20
31
Inject ,
21
32
InjectionToken ,
22
33
Injector ,
@@ -27,38 +38,27 @@ import {
27
38
Optional ,
28
39
SimpleChanges ,
29
40
ViewContainerRef ,
41
+ afterNextRender ,
42
+ booleanAttribute ,
43
+ forwardRef ,
44
+ inject ,
30
45
} from '@angular/core' ;
31
- import { DOCUMENT } from '@angular/common' ;
32
- import { Directionality } from '@angular/cdk/bidi' ;
33
- import { DOWN_ARROW , ENTER , ESCAPE , TAB , UP_ARROW , hasModifierKey } from '@angular/cdk/keycodes' ;
34
- import { _getEventTarget } from '@angular/cdk/platform' ;
35
- import { TemplatePortal } from '@angular/cdk/portal' ;
36
- import { ViewportRuler } from '@angular/cdk/scrolling' ;
37
- import {
38
- FlexibleConnectedPositionStrategy ,
39
- Overlay ,
40
- OverlayConfig ,
41
- OverlayRef ,
42
- PositionStrategy ,
43
- ScrollStrategy ,
44
- ConnectedPosition ,
45
- } from '@angular/cdk/overlay' ;
46
46
import { ControlValueAccessor , NG_VALUE_ACCESSOR } from '@angular/forms' ;
47
47
import {
48
+ MatOption ,
48
49
MatOptionSelectionChange ,
49
50
_countGroupLabelsBeforeOption ,
50
51
_getOptionScrollPosition ,
51
- MatOption ,
52
52
} from '@angular/material/core' ;
53
53
import { MAT_FORM_FIELD , MatFormField } from '@angular/material/form-field' ;
54
- import { defer , fromEvent , merge , Observable , of as observableOf , Subject , Subscription } from 'rxjs' ;
55
- import { delay , filter , map , switchMap , take , tap , startWith } from 'rxjs/operators' ;
56
- import { MatAutocompleteOrigin } from './autocomplete-origin' ;
54
+ import { Observable , Subject , Subscription , defer , fromEvent , merge , of as observableOf } from 'rxjs' ;
55
+ import { delay , filter , map , startWith , switchMap , take , tap } from 'rxjs/operators' ;
57
56
import {
58
- MatAutocompleteDefaultOptions ,
59
57
MAT_AUTOCOMPLETE_DEFAULT_OPTIONS ,
60
58
MatAutocomplete ,
59
+ MatAutocompleteDefaultOptions ,
61
60
} from './autocomplete' ;
61
+ import { MatAutocompleteOrigin } from './autocomplete-origin' ;
62
62
63
63
/**
64
64
* Provider that allows the autocomplete to register as a ControlValueAccessor.
@@ -456,6 +456,7 @@ export class MatAutocompleteTrigger
456
456
// Implemented as part of ControlValueAccessor.
457
457
setDisabledState ( isDisabled : boolean ) {
458
458
this . _element . nativeElement . disabled = isDisabled ;
459
+ this . _changeDetectorRef . markForCheck ( ) ;
459
460
}
460
461
461
462
_handleKeydown ( event : KeyboardEvent ) : void {
0 commit comments