primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Autocomplete when multiple=true and typeahead=false ignores unique=true

Open lblu12555 opened this issue 1 year ago • 0 comments

Describe the bug

As you can see in the Autocomplete examples in both v18 and v19, in the Multiple section, the "with typeahead" unique works but the "without typeahead" unique doesn't work. The "Without Typeahead" example allows you to enter multiple of the same entry.

Pull Request Link

No response

Reason for not contributing a PR

  • [ ] Lack of time
  • [ ] Unsure how to implement the fix/feature
  • [ ] Difficulty understanding the codebase
  • [ ] Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/ey7saxmy?file=src%2Fapp%2Fautocomplete-multiple-demo.html

Environment

Windows environment, Chrome browser

Angular version

v19

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to https://primeng.org/autocomplete
  2. Go to the Multiple section
  3. In the "Without Typeahead" example, enter "test" multiple times
  4. Observe that non-unique entries are allowed

According to the API, unique=true is the default. But even going into Stackblitz of the example and explicitly setting [unique]="true", it still allows the same text entered multiple times.

Expected behavior

When unique=true, it should not allow the same string to be added if it has already been added.

lblu12555 avatar Jun 26 '25 18:06 lblu12555