From b1ccd679c29fbc0e0b6759817edb15d2bdaffef9 Mon Sep 17 00:00:00 2001 From: pete-mcwilliams Date: Tue, 28 Nov 2023 11:29:37 +0000 Subject: [PATCH] Revert "#14223 fix for regression value can be '' or null" This reverts commit fa44251a3cc0198790ce9d740521930ab1f27dc8. --- src/app/components/dropdown/dropdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {