Skip to content

Commit

Permalink
Fixed #14170 - AutoComplete | Refactor conditional to update UI properly
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Nov 21, 2023
1 parent e011e6a commit 1efe76a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
}

updateInputValue() {
if (this.value && this.inputEL && this.inputEL.nativeElement) {
if (this.inputEL && this.inputEL.nativeElement) {
if (!this.multiple) {
this.inputEL.nativeElement.value = this.inputValue();
} else {
Expand Down Expand Up @@ -1513,9 +1513,11 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
}

writeValue(value: any): void {

this.value = value;
this.filled = this.value && this.value.length ? true : false;
this.modelValue.set(value);
console.log('a', value, this.modelValue())
this.updateInputValue();
this.cd.markForCheck();
}
Expand Down

1 comment on commit 1efe76a

@vercel
Copy link

@vercel vercel bot commented on 1efe76a Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.