diff --git a/src/app/components/dropdown/dropdown.ts b/src/app/components/dropdown/dropdown.ts index fba49d9bbd3..ecd1b1780ff 100755 --- a/src/app/components/dropdown/dropdown.ts +++ b/src/app/components/dropdown/dropdown.ts @@ -858,7 +858,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV } get isVisibleClearIcon(): boolean | undefined { - return this.modelValue() != null && this.hasSelectedOption() && this.showClear && !this.disabled; + return this.modelValue() != null && ObjectUtils.isNotEmpty(this.modelValue()) && this.modelValue() !== '' && this.showClear && !this.disabled; } get containerClass() { @@ -1459,7 +1459,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV } hasSelectedOption() { - return this.modelValue() !== undefined; + return ObjectUtils.isNotEmpty(this.modelValue()); } isValidSelectedOption(option) {