Skip to content

Commit 0565319

Browse files
committed
refactor(autocomplete): explicitly set static flag on all queries
This is a continuation of #15680. Explicitly marks all ViewChild and ContentChild queries so that the timing is consistent for apps using Ivy or ViewEngine.
1 parent 61b29bf commit 0565319

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/autocomplete/autocomplete.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ export class MatAutocomplete extends _MatAutocompleteMixinBase implements AfterC
105105
_isOpen: boolean = false;
106106

107107
/** @docs-private */
108-
@ViewChild(TemplateRef) template: TemplateRef<any>;
108+
@ViewChild(TemplateRef, {static: false}) template: TemplateRef<any>;
109109

110110
/** Element for the panel containing the autocomplete options. */
111-
@ViewChild('panel') panel: ElementRef;
111+
@ViewChild('panel', {static: false}) panel: ElementRef;
112112

113113
/** @docs-private */
114-
@ContentChildren(MatOption, { descendants: true }) options: QueryList<MatOption>;
114+
@ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;
115115

116116
/** @docs-private */
117117
@ContentChildren(MatOptgroup) optionGroups: QueryList<MatOptgroup>;

0 commit comments

Comments
 (0)