Skip to content

Commit

Permalink
Fixed primefaces#14007 - Dropdown empty label error
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMessall committed Nov 3, 2023
1 parent ba2aba5 commit c656b4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,11 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
}

get inputClass() {
const label = this.label();
return {
'p-dropdown-label p-inputtext': true,
'p-placeholder': this.placeholder && this.label() === this.placeholder,
'p-dropdown-label-empty': !this.editable && !this.selectedItemTemplate && (this.label() === 'p-emptylabel' || this.label().length === 0)
'p-placeholder': this.placeholder && label === this.placeholder,
'p-dropdown-label-empty': !this.editable && !this.selectedItemTemplate && (!label || label === 'p-emptylabel' || label.length === 0)
};
}

Expand Down

0 comments on commit c656b4e

Please sign in to comment.