Skip to content

Commit 12c046a

Browse files
committed
refactor(form-field): explicitly set static flag on all queries
Continuation of #15680. Explicitly marks all ViewChild and ContentChild queries so that the timing is consistent for apps using Ivy or ViewEngine.
1 parent bb5d544 commit 12c046a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/form-field/form-field.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ export class MatFormField extends _MatFormFieldMixinBase
235235
* @deprecated
236236
* @breaking-change 8.0.0
237237
*/
238-
@ViewChild('underline') underlineRef: ElementRef;
239-
240-
@ViewChild('connectionContainer') _connectionContainerRef: ElementRef;
241-
@ViewChild('inputContainer') _inputContainerRef: ElementRef;
242-
@ViewChild('label') private _label: ElementRef;
243-
@ContentChild(MatFormFieldControl) _control: MatFormFieldControl<any>;
244-
@ContentChild(MatPlaceholder) _placeholderChild: MatPlaceholder;
245-
@ContentChild(MatLabel) _labelChild: MatLabel;
238+
@ViewChild('underline', {static: false}) underlineRef: ElementRef;
239+
240+
@ViewChild('connectionContainer', {static: true}) _connectionContainerRef: ElementRef;
241+
@ViewChild('inputContainer', {static: false}) _inputContainerRef: ElementRef;
242+
@ViewChild('label', {static: false}) private _label: ElementRef;
243+
@ContentChild(MatFormFieldControl, {static: false}) _control: MatFormFieldControl<any>;
244+
@ContentChild(MatPlaceholder, {static: false}) _placeholderChild: MatPlaceholder;
245+
@ContentChild(MatLabel, {static: false}) _labelChild: MatLabel;
246246
@ContentChildren(MatError) _errorChildren: QueryList<MatError>;
247247
@ContentChildren(MatHint) _hintChildren: QueryList<MatHint>;
248248
@ContentChildren(MatPrefix) _prefixChildren: QueryList<MatPrefix>;

0 commit comments

Comments
 (0)