I've noticed that <p-autoComplete [multiple]="true" ... /> sometimes causes adding multiple values if one of them is prefix of another, and sometimes causes adding prefix value only rather than selected:
(notice "test" was added rather than "test-1", and later both "test" & "test-1" were added)
To anyone that may have the same issue, the temporary workaround I've came up with is to use suggestions as an objects with prefixed label & custom ng-template:
Describe the bug
Hello,
I've noticed that
<p-autoComplete [multiple]="true" ... />
sometimes causes adding multiple values if one of them is prefix of another, and sometimes causes adding prefix value only rather than selected:https://github.com/primefaces/primeng/assets/23403545/efecf374-db07-4224-899c-6bdf2cadb6e8
(notice "test" was added rather than "test-1", and later both "test" & "test-1" were added)
To anyone that may have the same issue, the temporary workaround I've came up with is to use suggestions as an objects with prefixed
label
& customng-template
:https://stackblitz.com/edit/github-7hs33e-ciep28?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts
Environment
https://stackblitz.com/edit/github-7hs33e-wudgma?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts
Reproducer
https://stackblitz.com/edit/github-7hs33e-wudgma?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts
Angular version
17.3.7
PrimeNG version
17.16
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
stackblitz so idk
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
Only single selected item is added.