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: The selected option is not unselected from the list on clear action #7576

Closed
mikejav opened this issue Jan 7, 2025 · 0 comments · Fixed by #7578
Closed

Dropdown: The selected option is not unselected from the list on clear action #7576

mikejav opened this issue Jan 7, 2025 · 0 comments · Fixed by #7578
Assignees
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA
Milestone

Comments

@mikejav
Copy link

mikejav commented Jan 7, 2025

Describe the bug

For the focusOnHover={false} and showClear={true} props combination when you click "clear" action, the value is reset, but the selected option remain selected on the list.

gif3

Reproducer

https://stackblitz.com/edit/fdkzcxdy?file=src%2FApp.jsx

System Information

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz 
    Memory: 17.13 GB / 31.93 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\NodeJS 20.10.0\node.EXE
    npm: 10.2.3 - C:\Program Files\NodeJS 20.10.0\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.51)
    Internet Explorer: 11.0.19041.4355
  npmPackages:
    primereact: ^10.8.5 => 10.8.5
    react: ^18.2.0 => 18.2.0

Steps to reproduce the behavior

  1. Go to https://stackblitz.com/edit/fdkzcxdy?file=src%2FApp.jsx
  2. Select any option in the Dropdown
  3. Click the "X" (the clear action)
  4. Open the Dropdown
  5. The previously selected option remains selected on the options list

Expected behavior

The selected option should be unselected after you click the clear action

@mikejav mikejav added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 7, 2025
melloware added a commit to melloware/primereact that referenced this issue Jan 7, 2025
@melloware melloware self-assigned this Jan 7, 2025
@melloware melloware added Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 7, 2025
@melloware melloware added this to the 10.9.2 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants