Skip to content

Commit

Permalink
Fix #14954 Dropdown head is empty when no selected option provided
Browse files Browse the repository at this point in the history
  • Loading branch information
tal-ladi committed Apr 27, 2024
1 parent fd53263 commit 8e77cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class DropdownItem {
<ng-container *ngIf="!selectedItemTemplate; else defaultPlaceholder">{{ label() === 'p-emptylabel' ? '&nbsp;' : label() }}</ng-container>
<ng-container *ngIf="selectedItemTemplate && selectedOption" [ngTemplateOutlet]="selectedItemTemplate" [ngTemplateOutletContext]="{ $implicit: selectedOption }"></ng-container>
<ng-template #defaultPlaceholder>
<span *ngIf="displayPlaceholder()">{{ label() === 'p-emptylabel' ? '&nbsp;' : placeholder() }}</span>
<span>{{ label() === 'p-emptylabel' ? '&nbsp;' : displayPlaceholder() ? placeholder() : label() }}</span>
</ng-template>
</span>
<input
Expand Down

0 comments on commit 8e77cc8

Please sign in to comment.