Component: p-autoComplete multiple=true sometimes causes adding different/multiple values if one of them is a prefix of another #15488
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
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:chrome_GMhZgo5KUC.mp4
(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.
The text was updated successfully, but these errors were encountered: