From 644e80786c6c1a8146d2e8596efbb059a355e051 Mon Sep 17 00:00:00 2001 From: Janik Schumacher Date: Mon, 8 Jul 2024 10:49:04 +0200 Subject: [PATCH] fix: #15974 --- src/app/components/dropdown/dropdown.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/components/dropdown/dropdown.ts b/src/app/components/dropdown/dropdown.ts index 904f34a9ef5..149d13746f2 100755 --- a/src/app/components/dropdown/dropdown.ts +++ b/src/app/components/dropdown/dropdown.ts @@ -1233,6 +1233,10 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV } updatePlaceHolderForFloatingLabel(): void { + if(this._placeholder() !== null && this._placeholder() !== undefined) { + // We don't want to overwrite the placeholder if it's already set + return; + } const parentElement = this.el.nativeElement.parentElement; const isInFloatingLabel = parentElement?.classList.contains('p-float-label'); if (parentElement && isInFloatingLabel && !this.selectedOption) {