Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete: emptyMessage is not showed, when no item fit condition #14744

Closed
kkoripl opened this issue Feb 7, 2024 · 2 comments
Closed

Autocomplete: emptyMessage is not showed, when no item fit condition #14744

kkoripl opened this issue Feb 7, 2024 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@kkoripl
Copy link

kkoripl commented Feb 7, 2024

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.

emptydropdown-without-fix

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

  1. Go to https://primeng.org/autocomplete
  2. Pick autocomplete, that have static items list - like countries at 'Reactive Forms' paragraph.
  3. Type something that won't fit any country, like 'notexisting'
  4. Empty list will be shown.

Expected behavior

There is no empty list shown - there is just input.

@kkoripl kkoripl added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 7, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 8, 2024
@VolodymyrKornetskyi
Copy link

VolodymyrKornetskyi commented Feb 10, 2024

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 ^

@cetincakiroglu cetincakiroglu added this to the 17.7.0 milestone Feb 12, 2024
@cetincakiroglu
Copy link
Contributor

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.

@cetincakiroglu cetincakiroglu changed the title Autocomplete: Empty list showed, when no item fit condition Autocomplete: emptyMessage is not showed, when no item fit condition Feb 13, 2024
@cetincakiroglu cetincakiroglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Feb 13, 2024
@cetincakiroglu cetincakiroglu self-assigned this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants