diff --git a/src/app/components/dropdown/dropdown.ts b/src/app/components/dropdown/dropdown.ts index 4272b70091d..0f5b4705643 100755 --- a/src/app/components/dropdown/dropdown.ts +++ b/src/app/components/dropdown/dropdown.ts @@ -1107,6 +1107,12 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV } } + clearEditableLabel(): void { + if (this.editableInputViewChild) { + this.editableInputViewChild.nativeElement.value = '' + } + } + getOptionIndex(index, scrollerOptions) { return this.virtualScrollerDisabled ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index']; } @@ -1734,7 +1740,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV clear(event: Event) { this.updateModel(null, event); - this.updateEditableLabel(); + this.clearEditableLabel(); this.onChange.emit({ originalEvent: event, value: this.value }); this.onClear.emit(event); }