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 v19 - Custom selected item with custom remove icon can not be removed #17769

Open
3 of 4 tasks
ElodieTcy opened this issue Feb 25, 2025 · 0 comments
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

Comments

@ElodieTcy
Copy link

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 using removetokenicon 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 using removetokenicon 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 autocomplete item template for example), so it could be a quick workaround for my issue, if you just add the index in the selectedItem template.

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/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

@ElodieTcy ElodieTcy 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 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant