Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/autocomplete): fix initial render logic #30348

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading