Dropdown: Allow empty string while not showing clear button #11836
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When setting
[showClear]
as true it will show up if the default "value" is an empty string. Initializing a form with empty strings is a recommended practice by the angular team.Environment
Happens in both stackblitz and local project
Reproducer
https://stackblitz.com/edit/primeng-dropdown-demo-yz3mvk
Angular version
14.0.0
PrimeNG version
14.0.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.x.x
Browser(s)
All of them
Steps to reproduce the behavior
Check how the first example works as expected but the second one shows up the X even if the placeholder is showing up.
Expected behavior
The *ngIf for the icon should take in account empty strings as well.
The text was updated successfully, but these errors were encountered: