p-chips doesn't fire onRemove if chip is deleted with backspace #1556

ghost81 opened this Issue Dec 12, 2016 · 0 comments


None yet

2 participants

ghost81 commented Dec 12, 2016

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

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
When you have chips in p-chips component and you press backspace to delete the last one,
this doesn't trigger onRemove event

Expected behavior
onRemove to be triggered

Minimal reproduction of the problem with instructions
Nothing special is needed here, but just a p-chips component and behavior attached to onRemove

What is the motivation / use case for changing the behavior?
It should behave like if you remove item from the "x"

Suggested fix
Lines 123-125 to be changed to:

let removedItem = this.value.pop();

Please tell us about your environment:
Ubuntu 16.10, Eclipse Neon.1, NPM, Apache 2.4, PHP 7.0

  • Angular version: 2.3.0

  • PrimeNG version: 1.0.1

  • Browser: [all]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@cagataycivici cagataycivici self-assigned this Dec 13, 2016
@cagataycivici cagataycivici added this to the 1.1 milestone Dec 13, 2016
@cagataycivici cagataycivici added a commit that closed this issue Dec 13, 2016
@cagataycivici cagataycivici Fixed #1556 0326c7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment