You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the value of a p-autocomplete with [showClear]="true" programatically in the Typescript class, the clear icon is not shown even though the value is present. Only when clicking into the Autocomplete, the clear icon is shown and stays shown when leaving the input again.
And please don't tell me this is intended behaviour because now the user has to first click into the input and then hit the clear button instead of only needing a single click on the clear button.
Describe the bug
When setting the value of a
p-autocomplete
with[showClear]="true"
programatically in the Typescript class, the clear icon is not shown even though the value is present. Only when clicking into the Autocomplete, the clear icon is shown and stays shown when leaving the input again.Environment
Reproducer
https://stackblitz.com/edit/s5gxpn?file=src%2Fapp%2Fautocomplete-dropdown-demo.ts
Angular version
18.2.3
PrimeNG version
17.18.9
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.19.1
Browser(s)
Chrome, Firefox
Steps to reproduce the behavior
[showClear]="true"
is setExpected behavior
The clear button should be visible whenever a value is present, even if the value is set programatically in the typescript class.
The text was updated successfully, but these errors were encountered: