Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
899 stars 360 forks source link

Delete icon does not delete the actual tag. #940

Open pradeepthota07 opened 4 years ago

pradeepthota07 commented 4 years ago

PLEASE MAKE SURE THAT:

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ ] support request/question

Notice: feature requests will be ignored, submit a PR if you'd like

Current behavior Clicking on delete icon doesn't remove the clicked tag.

Expected behavior Clicking on delete icon should remove the clicked tag.

Minimal reproduction of the problem with instructions (if applicable)

  1. Add a tag, ex: "rat".
  2. Double click on tag to get into edit mode, delete all the letters using backspace, enter another word. ex: "cat".
  3. Add another tag ex: "dog".
  4. Now delete the tag "cat" using delete icon. It actually deletes the tag "dog". Stackblitz: https://angular-ngx-chip-dropdown-test-hx1d9p.stackblitz.io

PS: this issue happens only when all the letters are deleted using backspace in editable mode and updating a tag. Please provide a fix or an alternative to suppress this issue.

What do you use to build your app?. Please specify the version angular-cli: 7.1.2

Angular version: 7.1.0

ngx-chips version: 2.1.0

Browser: all