Skip to content

Commit

Permalink
feat(libs): Focus search field and resolve expression has changed aft…
Browse files Browse the repository at this point in the history
…er it was checked - error
  • Loading branch information
Angi-Kinas committed Nov 9, 2023
1 parent 5f1c197 commit 9d57305
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
EventEmitter,
Expand Down Expand Up @@ -65,6 +66,7 @@ export class AutocompleteComponent

@Input() displayWithFn: (AutocompleteItem) => string = (item) => item

constructor(private cdRef: ChangeDetectorRef) {}
ngOnChanges(changes: SimpleChanges): void {
const { value } = changes
if (value) {
Expand Down Expand Up @@ -110,6 +112,7 @@ export class AutocompleteComponent

ngAfterViewInit(): void {
this.autocomplete.optionSelected.subscribe(this.selectionSubject)
this.cdRef.detectChanges()
}

ngOnDestroy(): void {
Expand Down

0 comments on commit 9d57305

Please sign in to comment.