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