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 onChange fires on re-selection of same item #2760

Closed
smitpsanghavi opened this issue May 12, 2017 · 8 comments
Closed

Dropdown onChange fires on re-selection of same item #2760

smitpsanghavi opened this issue May 12, 2017 · 8 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@smitpsanghavi
Copy link

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
On re-selection of the same dropdown item, onChange event is fired

Expected behavior
onChange should be fired only when the selection changes. Re-selection of the same item is technically not a change.

Minimal reproduction of the problem with instructions
This is not needed I guess as the implementation is fairly straightforward.

Please tell us about your environment:
Windows 10, VS 2017, NPM v3.10.9

  • Angular version: 4.1.1

  • PrimeNG version: 4.0.0

  • Browser: [all]

  • Language: [TypeScript 2.3.2]

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

@sudheerj
Copy link
Contributor

sudheerj commented May 12, 2017

I can replicate the issue.The onchange event is emitted on click of list, thats why the same item selection also causes the change event.

@smitpsanghavi
Copy link
Author

So is this accepted as a bug?

@smitpsanghavi
Copy link
Author

@sudheerj Is this going to be fixed in the next release?

@cyberrranger
Copy link

#2353 (the same Problem)

@smitpsanghavi
Copy link
Author

Bump!

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jun 20, 2017
@cagataycivici cagataycivici added this to the 4.1.1 milestone Jun 20, 2017
@cagataycivici cagataycivici self-assigned this Jun 23, 2017
@cagataycivici cagataycivici changed the title [BUG] Dropdown onChange fires on re-selection of same item Dropdown onChange fires on re-selection of same item Jun 23, 2017
@cagataycivici cagataycivici modified the milestones: 4.1.0, 4.1.1 Jun 23, 2017
@cagataycivici
Copy link
Member

Set to 4.1.0.

@diegohoyos
Copy link

#3392

@cagriman
Copy link

cagriman commented Dec 2, 2022

Hi,

I have still this problem while selecting same item.

Is this issue fixed, or not?

How could i realize selecting same item?

Thanks

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

6 participants