Dropdown: Clicking on currently selected item no longer closes the list #14917
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Previously, clicking on any item in a dropdown list would close it even if the item was already selected. Recently, the behaviour has changed: clicking on an item in the list closes it except if it is the currently selected item.
Environment
Reproducer
No response
Angular version
17.*
PrimeNG version
17.9.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
Browser(s)
Steps to reproduce the behavior
Go to the documentation of the Dropdown component: https://primeng.org/dropdown
On the first dropdown, select "New York" => The item is selected and the list disappears. (OK)
Open the dropdown again and select "New York" again => The list remains visible. (not OK)
Expected behavior
On previous versions (<= 17.4.0), the list would always disappear which is what a dropdown should do regardless of which is the currently selected item.
You can check the old (good) behaviour here: https://www.primefaces.org/primeng-v16-lts/dropdown
The text was updated successfully, but these errors were encountered: