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

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

Closed
ghost81 opened this issue Dec 12, 2016 · 0 comments
Closed

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

ghost81 opened this issue Dec 12, 2016 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ghost81
Copy link

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();
this.onModelChange(this.value);
this.onRemove.emit(removedItem);

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 added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Dec 13, 2016
@cagataycivici cagataycivici self-assigned this Dec 13, 2016
@cagataycivici cagataycivici added this to the 1.1 milestone Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants