Fixed typeahead not working correctly (#1490)

This commit is contained in:
Joseph Milazzo 2022-08-29 08:56:08 -05:00 committed by GitHub
parent 29827f423f
commit 6d10c52ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,6 @@ import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Observable, of, ReplaySubject, Subject } from 'rxjs';
import { auditTime, distinctUntilChanged, filter, map, shareReplay, switchMap, take, takeUntil, tap } from 'rxjs/operators';
import { KEY_CODES } from '../shared/_services/utility.service';
import { ToggleService } from '../_services/toggle.service';
import { SelectionCompareFn, TypeaheadSettings } from './typeahead-settings';
/**
@ -256,6 +255,7 @@ export class TypeaheadComponent implements OnInit, OnDestroy {
tap((filteredOptions) => {
this.isLoadingOptions = false;
this.focusedIndex = 0;
this.cdRef.markForCheck();
setTimeout(() => {
this.updateShowAddItem(filteredOptions);
this.updateHighlight();