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

Dropdown clear functionality should emit onChange #5288

Closed
Ayuob-Alfouzan opened this issue Mar 8, 2018 · 1 comment
Closed

Dropdown clear functionality should emit onChange #5288

Ayuob-Alfouzan opened this issue Mar 8, 2018 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Ayuob-Alfouzan
Copy link

I'm submitting a

[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
The clear functionality of the dropdown list is very nice and needed, an enhancement over that is to trigger an onChange action to know that the user cleared the list and do something with that information. Just like if he selected an item from list.

Expected behavior
I need to know when a user cleared his selection

Minimal reproduction of the problem with instructions
Click on the clear icon, onChange should be triggered,

Please tell us about your environment:

  • Angular version: 5.2.1
  • PrimeNG version: 5.2.1
@raymond-kolorbox
Copy link

Here is a workaround for clear handler, add this in onChange function

$('.ui-dropdown-clear-icon').on('click', () => {
    this.clearAction();
});

@cagataycivici cagataycivici self-assigned this Mar 9, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Mar 9, 2018
@cagataycivici cagataycivici added this to the 5.2.2 milestone Mar 9, 2018
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

3 participants