Skip to content

Commit

Permalink
fix: #15974
Browse files Browse the repository at this point in the history
  • Loading branch information
LoaderB0T committed Jul 8, 2024
1 parent e804cd6 commit 644e807
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 644e807

Please sign in to comment.