Autocomplete: emptyMessage is not showed, when no item fit condition
Describe the bug
When entering value that can't be auto completed due to lack of items fitting given condition, there is an empty html list shown.
Environment
Windows 10 Primeng: v16.9.2-lts + Angular: v16.2.12 - reproduced at Primeng: v17.5.0 + Angular: v17.0.5
Reproducer
https://primeng.org/autocomplete
Angular version
16.2.12
PrimeNG version
16.9.2-lts
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.6.0+
Browser(s)
No response
Steps to reproduce the behavior
- Go to https://primeng.org/autocomplete
- Pick autocomplete, that have static items list - like countries at 'Reactive Forms' paragraph.
- Type something that won't fit any country, like 'notexisting'
- Empty list will be shown.
Expected behavior
There is no empty list shown - there is just input.
agreed. Also found an issue with double form update on item select (not always). Check console logs here https://stackblitz.com/edit/zcpssv?file=src%2Fapp%2Fdemo%2Fautocomplete-reactive-forms-demo.html
@mehmetcetin01140 ^
Hi,
Expected behavior is when the search value does not exist in the options, an empty message should be displayed. Your example works with using [showEmptyMessage]= "true". I'll make it true by default to avoid misunderstandings such as this issue.