Skip to content

Commit

Permalink
fix(material/autocomplete): fix initial render logic (#30348)
Browse files Browse the repository at this point in the history
(cherry picked from commit 12b7671)
  • Loading branch information
mmalerba committed Jan 17, 2025
1 parent db3895c commit 5c44216
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/material/autocomplete/autocomplete-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import {
ChangeDetectorRef,
Directive,
ElementRef,
EnvironmentInjector,
InjectionToken,
Injector,
Input,
NgZone,
OnChanges,
Expand Down Expand Up @@ -131,7 +131,7 @@ export const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {
export class MatAutocompleteTrigger
implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy
{
private _injector = inject(Injector);
private _environmentInjector = inject(EnvironmentInjector);
private _element = inject<ElementRef<HTMLInputElement>>(ElementRef);
private _overlay = inject(Overlay);
private _viewContainerRef = inject(ViewContainerRef);
Expand Down Expand Up @@ -609,7 +609,7 @@ export class MatAutocompleteTrigger
() => {
subscriber.next();
},
{injector: this._injector},
{injector: this._environmentInjector},
);
});
const optionChanges = this.autocomplete.options.changes.pipe(
Expand Down

0 comments on commit 5c44216

Please sign in to comment.