Autocomplete v19 - Custom selected item with custom remove icon can not be removed #17769
Open
3 of 4 tasks
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
With PrimeNG v18 multiple autocomplete, I was able to customise my selected item using
selectedItem
template, and i also had the possibility to customize the remove icon usingremovetokenicon
template.If I try to do the same with v19, when I click on the custom remove icon, nothing happens, the item is still selected.
As a way to bypass this issue, I tried to customize both the remove icon and the selected item inside the
selectedItem
template (without usingremovetokenicon
template).My idea was to call PrimeNG internal method
removeOption(event, index)
when clicking on the custom icon, unfortunatly I don't have the index value, in some of your templates the index is available (inside autocompleteitem
template for example), so it could be a quick workaround for my issue, if you just add the index in theselectedItem
template.Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/uox8zzmb-uh3x6z62?file=package.json
Environment
Trying to use PrimeNG 19 autocomplete in multiple mode, with angular 19 and our own custom icons.
Angular version
19.1.5
PrimeNG version
v19
Node version
20.18.3
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
The item should disappear when clicking on the remove icon
The text was updated successfully, but these errors were encountered: