p-dropdown: Filtering all items incorrectly clears the dropdown's selected value #14596
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
For a p-dropdown that is configured with a filter, when a user filters all option values, the selected dropdown item is also incorrectly cleared
The video listed below demonstrates the issue. In the video, only the filter is changed but the dropdown's selected value automatically changes between the"actual" selected value and an empty value
DropdownFilterBug.mov
Environment
windows and macos
Reproducer
https://stackblitz.com/edit/vr5hjz-6e41od
Angular version
17.x
PrimeNG version
17.3.3
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.1
Browser(s)
safari, chrome, firefox
Steps to reproduce the behavior
-- The dropdown option item list is displayed with a filter field (good)
-- The dropdown selected item is automatically cleared (bad)
-- The dropdown option item list is not displayed (good)
-- The dropdown selected item is still cleared (bad)
Expected behavior
For all steps, the dropdown selected item should not be empty and should be "France"
The text was updated successfully, but these errors were encountered: